rv10: consider B frames in low delay streams invalid.
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 13 Nov 2012 16:59:18 +0000 (17:59 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 13 Nov 2012 17:00:00 +0000 (18:00 +0100)
Fix assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/rv10.c

index 21dec46..a5181b3 100644 (file)
@@ -332,6 +332,10 @@ static int rv20_decode_picture_header(RVDecContext *rv)
         return -1;
     }
 
+    if(s->low_delay && s->pict_type==AV_PICTURE_TYPE_B){
+        av_log(s->avctx, AV_LOG_ERROR, "low delay B\n");
+        return -1;
+    }
     if(s->last_picture_ptr==NULL && s->pict_type==AV_PICTURE_TYPE_B){
         av_log(s->avctx, AV_LOG_ERROR, "early B pix\n");
         return -1;