Commit c94d9079 authored by Michael Niedermayer's avatar Michael Niedermayer

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

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c2657633
...@@ -2539,6 +2539,7 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx, ...@@ -2539,6 +2539,7 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
ret = ff_thread_decode_frame(avctx, frame, got_frame_ptr, &tmp); ret = ff_thread_decode_frame(avctx, frame, got_frame_ptr, &tmp);
else { else {
ret = avctx->codec->decode(avctx, frame, got_frame_ptr, &tmp); ret = avctx->codec->decode(avctx, frame, got_frame_ptr, &tmp);
av_assert0(ret <= tmp.size);
frame->pkt_dts = avpkt->dts; frame->pkt_dts = avpkt->dts;
} }
if (ret >= 0 && *got_frame_ptr) { if (ret >= 0 && *got_frame_ptr) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment