1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/error_resilience: Fix handling of matrox mpeg2

Fixes Ticket2615

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-08-18 14:20:16 +02:00
parent 70967a60df
commit 7d776062f9

View File

@ -860,6 +860,21 @@ void ff_er_frame_end(ERContext *s)
(s->avctx->skip_top + s->avctx->skip_bottom)) {
return;
}
for (mb_x = 0; mb_x < s->mb_width; mb_x++) {
int status = s->error_status_table[mb_x + (s->mb_height - 1) * s->mb_stride];
if (status != 0x7F)
break;
}
if ( mb_x == s->mb_width
&& s->avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO
&& (s->avctx->height&16)
&& s->error_count == 3 * s->mb_width * (s->avctx->skip_top + s->avctx->skip_bottom + 1)
) {
av_log(s->avctx, AV_LOG_DEBUG, "ignoring last missing slice\n");
return;
}
if (s->last_pic) {
if (s->last_pic->f.width != s->cur_pic->f.width ||
s->last_pic->f.height != s->cur_pic->f.height ||