[FFmpeg-cvslog] twinvq: return an error when the packet size is too small
Justin Ruggles
git at videolan.org
Sun Oct 23 05:53:11 CEST 2011
ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Fri Sep 23 19:25:47 2011 -0400| [5ed68178225c82f6525f962b895bce682e9ad05c] | committer: Justin Ruggles
twinvq: return an error when the packet size is too small
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5ed68178225c82f6525f962b895bce682e9ad05c
---
libavcodec/twinvq.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c
index 1326d22..1c800ee 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);
More information about the ffmpeg-cvslog
mailing list