Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Cadhalpun <andreas.cadhalpun@googlemail.com>2015-04-28 01:30:51 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-04-28 04:21:12 +0300
commit464c49155ce7ffc88ed39eb2511e7a75565c24be (patch)
treefbe25083835f99eb459c6b4a3549152648f921ad /libavcodec/apedec.c
parent8ca170a78ab6e50f44d27d8a6b4ad7ba1ed81f0c (diff)
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>
Diffstat (limited to 'libavcodec/apedec.c')
-rw-r--r--libavcodec/apedec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 536361cd84..ffd54c10f8 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -1461,13 +1461,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) {