]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/utils: Assert that audio decoders do not report using more data than was...
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 4 Jun 2015 20:35:31 +0000 (22:35 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 4 Jun 2015 21:10:56 +0000 (23:10 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/utils.c

index 8695cb968947e7f5abfbf3404ccdbc82018a37a6..558afebc2f10d472c1df57d671c64c0e2883a835 100644 (file)
@@ -2539,6 +2539,7 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
             ret = ff_thread_decode_frame(avctx, frame, got_frame_ptr, &tmp);
         else {
             ret = avctx->codec->decode(avctx, frame, got_frame_ptr, &tmp);
+            av_assert0(ret <= tmp.size);
             frame->pkt_dts = avpkt->dts;
         }
         if (ret >= 0 && *got_frame_ptr) {