direcdec: fix infinite loop
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 1 Apr 2012 14:11:29 +0000 (16:11 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 1 Apr 2012 14:11:29 +0000 (16:11 +0200)
Fixes Ticket1156

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/diracdec.c

index f9aace9..5c4ed88 100644 (file)
@@ -1870,7 +1870,7 @@ static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     }
 
     if (!s->current_picture)
-        return 0;
+        return buf_size;
 
     if (s->current_picture->avframe.display_picture_number > s->frame_number) {
         DiracFrame *delayed_frame = remove_frame(s->delay_frames, s->frame_number);