twinvq: return an error when the packet size is too small
This commit is contained in:
parent
07e1256456
commit
5ed6817822
@ -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) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"Frame too small (%d bytes). Truncated file?\n", buf_size);
|
||||
*data_size = 0;
|
||||
return buf_size;
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
init_get_bits(&gb, buf, buf_size * 8);
|
||||
|
Loading…
x
Reference in New Issue
Block a user