[FFmpeg-devel] [PATCH] Check that frame passed to draw_slice is valid.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Apr 5 15:44:35 CEST 2013

There seems to be an actual bug here though, since after an aspect
change this function repeatedly tries to call draw_slice with a frame
that has NULL data pointers.
The issue is reproducible in e.g. MPlayer, see
for a description and sample.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
 libavcodec/mpegvideo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 2969a8c..4f0479a 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -2985,6 +2985,7 @@ void ff_draw_horiz_band(AVCodecContext *avctx, DSPContext *dsp, Picture *cur,
             for (i = 3; i < AV_NUM_DATA_POINTERS; i++)
                 offset[i] = 0;
+        av_assert0(src->data[0]);

More information about the ffmpeg-devel mailing list