Check for missing reference in vp5/6 decoder.
authorLaurent Aimar <fenrir@videolan.org>
Wed, 21 Sep 2011 18:46:30 +0000 (20:46 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 21 Sep 2011 23:19:15 +0000 (01:19 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6a0e78929aa7d6b2c6b598c1589fb0e48fccb132)

libavcodec/vp56.c

index ad451c2..cf89176 100644 (file)
@@ -399,6 +399,8 @@ static void vp56_decode_mb(VP56Context *s, int row, int col, int is_alpha)
 
     frame_current = s->framep[VP56_FRAME_CURRENT];
     frame_ref = s->framep[ref_frame];
+    if (mb_type != VP56_MB_INTRA && !frame_ref->data[0])
+        return;
 
     ab = 6*is_alpha;
     b_max = 6 - 2*is_alpha;