aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/twinvq.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-09-23 19:25:47 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-10-22 15:38:05 -0400
commit5ed68178225c82f6525f962b895bce682e9ad05c (patch)
tree9ec679445e9af7a413a93b4cef2f35873f719baa /libavcodec/twinvq.c
parent07e12564562cf01a94f9ca6bf378c4e6bd11d29d (diff)
downloadffmpeg-5ed68178225c82f6525f962b895bce682e9ad05c.tar.gz
twinvq: return an error when the packet size is too small
Diffstat (limited to 'libavcodec/twinvq.c')
-rw-r--r--libavcodec/twinvq.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c
index 1326d22ea7..1c800ee184 100644
--- a/libavcodec/twinvq.c
+++ b/libavcodec/twinvq.c
@@ -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);