[FFmpeg-cvslog] mpeg12dec: if lavc's mpeg2 decoder was asked to drop a frame, it could still output an old frame, and mess up timestamps

Joakim Plate git at videolan.org
Mon Sep 12 04:17:16 CEST 2011


ffmpeg | branch: master | Joakim Plate <elupus at ecce.se> | Mon Sep 12 04:03:40 2011 +0200| [340e6735fee6b6d29c91bb520f2de8d9e06dcd67] | committer: Michael Niedermayer

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 <michaelni at gmx.at>

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

 libavcodec/mpeg12.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 970d1d5..6c48826 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;



More information about the ffmpeg-cvslog mailing list