diff --git a/cmdutils.c b/cmdutils.c
index bd6ad449f7af4e0a82a09883771a0c43a5d2d76f..7c2117637ed0ba03ada94f5c35b90ac49372b7ed 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -1853,11 +1853,6 @@ static int alloc_buffer(FrameBuffer **pool, AVCodecContext *s, FrameBuffer **pbu
         av_log(s, AV_LOG_ERROR, "alloc_buffer: av_image_alloc() failed\n");
         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);
 
     avcodec_get_chroma_sub_sample(s->pix_fmt, &h_chroma_shift, &v_chroma_shift);
     for (i = 0; i < FF_ARRAY_ELEMS(buf->data); i++) {
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index dc664d7d8646d8d55479f4e0f5f047c9cd55c7ce..f55d378a038b7c5c984d4542e77b7d4e8f92e409 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -467,7 +467,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 AVERROR(ENOMEM);
-            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])