mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-28 18:32:22 +00:00
atrac3: return error if packet is too small
This commit is contained in:
parent
7e4881a2d0
commit
1fead73d7b
@ -834,8 +834,7 @@ static int atrac3_decode_frame(AVCodecContext *avctx,
|
|||||||
if (buf_size < avctx->block_align) {
|
if (buf_size < avctx->block_align) {
|
||||||
av_log(avctx, AV_LOG_ERROR,
|
av_log(avctx, AV_LOG_ERROR,
|
||||||
"Frame too small (%d bytes). Truncated file?\n", buf_size);
|
"Frame too small (%d bytes). Truncated file?\n", buf_size);
|
||||||
*data_size = 0;
|
return AVERROR_INVALIDDATA;
|
||||||
return buf_size;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
out_size = 1024 * q->channels * av_get_bytes_per_sample(avctx->sample_fmt);
|
out_size = 1024 * q->channels * av_get_bytes_per_sample(avctx->sample_fmt);
|
||||||
|
Loading…
Reference in New Issue
Block a user