diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c index 463594320cb6a7ebd9b7236c581fccf692aba826..6cf5869ab1d26231977afc83a51fb6a44b2819c4 100644 --- a/libavcodec/rv34.c +++ b/libavcodec/rv34.c @@ -1406,6 +1406,8 @@ int ff_rv34_decode_frame(AVCodecContext *avctx, }else r->si.end = si.start; } + if(!i && si.type == FF_B_TYPE && (!s->last_picture_ptr || !s->last_picture_ptr->data[0])) + return -1; last = rv34_decode_slice(r, r->si.end, buf + offset, size); s->mb_num_left = r->s.mb_x + r->s.mb_y*r->s.mb_width - r->si.start; if(last)