]> git.sesse.net Git - ffmpeg/commitdiff
get_buffer(): do not initialize the data.
authorAnton Khirnov <anton@khirnov.net>
Wed, 30 Jan 2013 15:41:08 +0000 (16:41 +0100)
committerAnton Khirnov <anton@khirnov.net>
Fri, 15 Feb 2013 15:08:44 +0000 (16:08 +0100)
There may be more decoders that rely on this. Those should be found and
fixed.

cmdutils.c
libavcodec/utils.c

index 0b3724e8a6a45b4cfaa7b7ab07abaf67e9760f4f..5b853fd9101b4d22b24c57c43781afcbaa38029b 100644 (file)
@@ -1563,11 +1563,6 @@ static int alloc_buffer(FrameBuffer **pool, AVCodecContext *s, FrameBuffer **pbu
         av_freep(&buf);
         return ret;
     }
-    /* XXX this shouldn't be needed, but some tests break without this line
-     * those decoders are buggy and need to be fixed.
-     * the following tests fail:
-     */
-    memset(buf->base[0], 128, ret);
 
     av_pix_fmt_get_chroma_sub_sample(s->pix_fmt,
                                      &h_chroma_shift, &v_chroma_shift);
index 86e154621b056000db921d2700bbf20b3f5d490d..4148264eb1206c63ed5468312e7ebfcf558e771b 100644 (file)
@@ -421,7 +421,6 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
             buf->base[i] = av_malloc(size[i] + 16); //FIXME 16
             if (buf->base[i] == NULL)
                 return -1;
-            memset(buf->base[i], 128, size[i]);
 
             // no edge if EDGE EMU or not planar YUV
             if ((s->flags & CODEC_FLAG_EMU_EDGE) || !size[2])