diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-18 18:57:56 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-03 19:49:55 +0100 |
commit | 9dd420ede168a95bf2896c9eaf17cccb6491487a (patch) | |
tree | c46db9c53e167b520cfacf32edf38b683d2e2c87 /libavcodec | |
parent | a1974d1ea0097a09213383027dfdf17703f4e127 (diff) | |
download | ffmpeg-9dd420ede168a95bf2896c9eaf17cccb6491487a.tar.gz |
adx_parser: Fix infinite loop.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3bf1d787b58cf268f3c055d6f2509fd75258450b)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/adx_parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/adx_parser.c b/libavcodec/adx_parser.c index ebcb1370e5..f5d7989ecf 100644 --- a/libavcodec/adx_parser.c +++ b/libavcodec/adx_parser.c @@ -56,7 +56,6 @@ static int adx_parse(AVCodecParserContext *s1, if (ret = avpriv_adx_decode_header(avctx, pc->buffer, pc->index, &s->header_size, NULL)) return AVERROR_INVALIDDATA; - s->block_size = BLOCK_SIZE * avctx->channels; } if (s->header_size && s->header_size <= pc->index) { avctx->extradata = av_mallocz(s->header_size + FF_INPUT_BUFFER_PADDING_SIZE); @@ -71,6 +70,7 @@ static int adx_parse(AVCodecParserContext *s1, *poutbuf_size = 0; return buf_size; } + s->block_size = BLOCK_SIZE * avctx->channels; if (pc->index - s->buf_pos >= s->block_size) { *poutbuf = &pc->buffer[s->buf_pos]; |