mpeg12: print an error when there was a frame in extradata.
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 11 May 2012 16:37:03 +0000 (18:37 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 11 May 2012 16:46:56 +0000 (18:46 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mpeg12.c

index b5f914c..30456e9 100644 (file)
@@ -2288,7 +2288,10 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
 
     if (avctx->extradata && !avctx->frame_number) {
         int ret = decode_chunks(avctx, picture, data_size, avctx->extradata, avctx->extradata_size);
-        *data_size = 0;
+        if(*data_size) {
+            av_log(avctx, AV_LOG_ERROR, "picture in extradata\n");
+            *data_size = 0;
+        }
         if (ret < 0 && (avctx->err_recognition & AV_EF_EXPLODE))
             return ret;
     }