[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
http://bugzilla.mplayerhq.hu/show_bug.cgi?id=2135
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]);
 
         emms_c();
 
-- 
1.8.1.5



More information about the ffmpeg-devel mailing list