[FFmpeg-cvslog] avcodec/mpeg12dec: fix support for interlaced mpeg2 with missing last slice
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Fri Aug 1 21:25:51 CEST 2014
On Fri, Aug 01, 2014 at 09:20:28PM +0200, Michael Niedermayer wrote:
> diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
> index e78c549..27bb6e0 100644
> --- a/libavcodec/mpeg12dec.c
> +++ b/libavcodec/mpeg12dec.c
> @@ -1884,6 +1884,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;
Could you maybe add a comment explaining this piece of code a bit?
Assuming you can think of something that might make it easier to
understand. I guess at least that it's only a bug workaround probably
is a useful piece of information.
Thanks,
Reimar
More information about the ffmpeg-cvslog
mailing list