avcodec/mjpegdec: print a message when there was just a single field and no frame
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 14 Aug 2013 16:51:13 +0000 (18:51 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 14 Aug 2013 17:16:38 +0000 (19:16 +0200)
Fixes ticket1915

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mjpegdec.c

index 76a4a31..6e16152 100644 (file)
@@ -1972,6 +1972,10 @@ av_cold int ff_mjpeg_decode_end(AVCodecContext *avctx)
     MJpegDecodeContext *s = avctx->priv_data;
     int i, j;
 
+    if (s->interlaced && s->bottom_field == !s->interlace_polarity && s->got_picture && !avctx->frame_number) {
+        av_log(avctx, AV_LOG_INFO, "Single field\n");
+    }
+
     if (s->picture_ptr)
         av_frame_unref(s->picture_ptr);