Avoid NULL dereference on corrupted bitstream with real decoder.
authorLaurent Aimar <fenrir@videolan.org>
Sat, 17 Sep 2011 21:43:58 +0000 (23:43 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 21 Sep 2011 18:56:53 +0000 (20:56 +0200)
rv34_decode_slice() can return without allocating any pictures.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 140dbcff357351570426efd0e0bc00e380f5436e)

libavcodec/rv34.c

index 0e5f868..9196c95 100644 (file)
@@ -1498,7 +1498,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);