rv34: Avoid NULL dereference on corrupted bitstream
authorLaurent Aimar <fenrir@videolan.org>
Sat, 17 Sep 2011 21:43:58 +0000 (23:43 +0200)
committerMartin Storsjö <martin@martin.st>
Mon, 19 Sep 2011 12:44:22 +0000 (15:44 +0300)
rv34_decode_slice() can return without allocating any pictures.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavcodec/rv34.c

index 90ff51d..aa52a93 100644 (file)
@@ -1533,7 +1533,7 @@ int ff_rv34_decode_frame(AVCodecContext *avctx,
             break;
     }
 
-    if(last){
+    if(last && s->current_picture_ptr){
         if(r->loop_filter)
             r->loop_filter(r, s->mb_height - 1);
         ff_er_frame_end(s);