This prevents crashes with some corrupted bitstreams.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -547,8 +547,12 @@ static int rv10_decode_packet(AVCodecContext *avctx, |
547 | 547 |
if(MPV_frame_start(s, avctx) < 0) |
548 | 548 |
return -1; |
549 | 549 |
ff_er_frame_start(s); |
550 |
+ } else { |
|
551 |
+ if (s->current_picture_ptr->f.pict_type != s->pict_type) |
|
552 |
+ return -1; |
|
550 | 553 |
} |
551 | 554 |
|
555 |
+ |
|
552 | 556 |
av_dlog(avctx, "qscale=%d\n", s->qscale); |
553 | 557 |
|
554 | 558 |
/* default quantization values */ |