Mercurial > libavcodec.hg
changeset 12138:41f078d6869d libavcodec
Do not try to decode less than one frame of data in TrueSpeech decoder.
This should solve issue 2085.
author | kostya |
---|---|
date | Sun, 11 Jul 2010 14:50:20 +0000 |
parents | b8a0924d6e42 |
children | e59926e2c50c |
files | truespeech.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/truespeech.c Sun Jul 11 07:53:39 2010 +0000 +++ b/truespeech.c Sun Jul 11 14:50:20 2010 +0000 @@ -347,6 +347,11 @@ if (!buf_size) return 0; + if (buf_size < 32) { + av_log(avctx, AV_LOG_ERROR, + "Too small input buffer (%d bytes), need at least 32 bytes\n", buf_size); + return -1; + } iterations = FFMIN(buf_size / 32, *data_size / 480); for(j = 0; j < iterations; j++) { truespeech_read_frame(c, buf + consumed);