diff options
author | Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> | 2015-04-28 00:30:51 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-01 23:25:21 +0200 |
commit | 427cf443ab1f905056399cbe19aa46107e275f98 (patch) | |
tree | b512e348d0578a70ae56eee12907ba57379340a9 | |
parent | d818b8338c238f4b8dea7a4a13dd1e9b427d249e (diff) | |
download | ffmpeg-427cf443ab1f905056399cbe19aa46107e275f98.tar.gz |
apedec: set s->samples only when init_frame_decoder succeeded
Otherwise range_start_decoding is not necessarily run and thus
ctx->rc.range still 0 in range_dec_normalize leading to an infinite
loop.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 464c49155ce7ffc88ed39eb2511e7a75565c24be)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/apedec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c index 860721484a..577d0aa260 100644 --- a/libavcodec/apedec.c +++ b/libavcodec/apedec.c @@ -1476,13 +1476,13 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data, nblocks); return AVERROR_INVALIDDATA; } - s->samples = nblocks; /* Initialize the frame decoder */ if (init_frame_decoder(s) < 0) { av_log(avctx, AV_LOG_ERROR, "Error reading frame header\n"); return AVERROR_INVALIDDATA; } + s->samples = nblocks; } if (!s->data) { |