[FFmpeg-cvslog] avcodec/utils: Assert that audio decoders do not report using more data than was input

Michael Niedermayer git at videolan.org
Thu Jun 4 23:12:21 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Jun  4 22:35:31 2015 +0200| [c94d9079b16c35834b8bcd15cb43ca50e0a25485] | committer: Michael Niedermayer

avcodec/utils: Assert that audio decoders do not report using more data than was input

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/utils.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 8695cb9..558afeb 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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) {



More information about the ffmpeg-cvslog mailing list