[FFmpeg-cvslog] get_buffer(): do not initialize the data.

Anton Khirnov git at videolan.org
Sat Feb 16 13:21:01 CET 2013


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Jan 30 16:41:08 2013 +0100| [d2a25c4032ce6ceabb0f51b5c1e6ca865395a793] | committer: Anton Khirnov

get_buffer(): do not initialize the data.

There may be more decoders that rely on this. Those should be found and
fixed.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d2a25c4032ce6ceabb0f51b5c1e6ca865395a793
---

 cmdutils.c         |    5 -----
 libavcodec/utils.c |    1 -
 2 files changed, 6 deletions(-)

diff --git a/cmdutils.c b/cmdutils.c
index 0b3724e..5b853fd 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -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);
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 86e1546..4148264 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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])



More information about the ffmpeg-cvslog mailing list