[FFmpeg-cvslog] avcodec/mpeg12dec: fix support for interlaced mpeg2 with missing last slice

Michael Niedermayer git at videolan.org
Tue Aug 5 04:58:08 CEST 2014


ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Fri Aug  1 21:10:43 2014 +0200| [81d8bad786819d8358058fd716f94279c3ccc5eb] | committer: Michael Niedermayer

avcodec/mpeg12dec: fix support for interlaced mpeg2 with missing last slice

Fixes Ticket3809

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit f95298c913899207344d668a6d5624cb2d2e480c)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=81d8bad786819d8358058fd716f94279c3ccc5eb
---

 libavcodec/mpeg12dec.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 1f89830..a464556 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -1878,6 +1878,14 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y,
                 } else
                     goto eos;
             }
+            if (s->mb_y >= ((s->height + 15) >> 4) &&
+                s->progressive_frame &&
+                !s->progressive_sequence &&
+                get_bits_left(&s->gb) <= 8 &&
+                get_bits_left(&s->gb) >= 0 &&
+                s->mb_skip_run == -1 &&
+                show_bits(&s->gb, 8) == 0)
+                goto eos;
 
             ff_init_block_index(s);
         }



More information about the ffmpeg-cvslog mailing list