OSDN Git Service

mpeg12dec: if lavc's mpeg2 decoder was asked to drop a frame, it could still output...
authorJoakim Plate <elupus@ecce.se>
Mon, 12 Sep 2011 02:03:40 +0000 (04:03 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 12 Sep 2011 02:03:40 +0000 (04:03 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mpeg12.c

index 970d1d5..6c48826 100644 (file)
@@ -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;