From: Joakim Plate Date: Mon, 12 Sep 2011 02:03:40 +0000 (+0200) Subject: mpeg12dec: if lavc's mpeg2 decoder was asked to drop a frame, it could still output... X-Git-Tag: rel20110916_inqubus2.b.0~4^2~7 X-Git-Url: http://git.osdn.net/view?p=coroid%2Fffmpeg_saccubus.git;a=commitdiff_plain;h=340e6735fee6b6d29c91bb520f2de8d9e06dcd67 mpeg12dec: if lavc's mpeg2 decoder was asked to drop a frame, it could still output an old frame, and mess up timestamps Signed-off-by: Michael Niedermayer --- diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 970d1d570..6c4882671 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -1968,7 +1968,7 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict) ff_xvmc_field_end(s); /* end of slice reached */ - if (/*s->mb_y << field_pic == s->mb_height &&*/ !s->first_field) { + if (/*s->mb_y << field_pic == s->mb_height &&*/ !s->first_field && !s->first_slice) { /* end of image */ s->current_picture_ptr->f.qscale_type = FF_QSCALE_TYPE_MPEG2;