diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index adcc87cc95c90501c30a661bfb55a22d4bdb8909..11c9734fc05916bcc0441ab992868777405eac34 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -360,6 +360,11 @@ static int rv20_decode_picture_header(MpegEncContext *s) return -1; } + if(s->last_picture_ptr==NULL && s->pict_type==B_TYPE){ + av_log(s->avctx, AV_LOG_ERROR, "early B pix\n"); + return -1; + } + if (get_bits(&s->gb, 1)){ av_log(s->avctx, AV_LOG_ERROR, "unknown bit set\n"); return -1;