You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
twinvq: return an error when the packet size is too small
This commit is contained in:
@@ -831,8 +831,7 @@ static int twin_decode_frame(AVCodecContext * avctx, void *data,
|
|||||||
if (buf_size*8 < avctx->bit_rate*mtab->size/avctx->sample_rate + 8) {
|
if (buf_size*8 < avctx->bit_rate*mtab->size/avctx->sample_rate + 8) {
|
||||||
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(EINVAL);
|
||||||
return buf_size;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
init_get_bits(&gb, buf, buf_size * 8);
|
init_get_bits(&gb, buf, buf_size * 8);
|
||||||
|
Reference in New Issue
Block a user