[FFmpeg-cvslog] avcodec/error_resilience: Fix handling of matrox mpeg2
Michael Niedermayer
git at videolan.org
Sun Aug 18 14:38:09 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Aug 18 14:20:16 2013 +0200| [7d776062f97d14d5d9db96764f4785c91fb3e1f2] | committer: Michael Niedermayer
avcodec/error_resilience: Fix handling of matrox mpeg2
Fixes Ticket2615
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7d776062f97d14d5d9db96764f4785c91fb3e1f2
---
libavcodec/error_resilience.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
index c9f5e1f..9c3b505 100644
--- a/libavcodec/error_resilience.c
+++ b/libavcodec/error_resilience.c
@@ -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 ||
More information about the ffmpeg-cvslog
mailing list