From 340e6735fee6b6d29c91bb520f2de8d9e06dcd67 Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Mon, 12 Sep 2011 04:03:40 +0200 Subject: [PATCH] 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 --- libavcodec/mpeg12.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 970d1d5703..6c4882671a 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; -- 2.11.0