aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>2020-05-02 10:09:01 +0200
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2020-05-02 10:51:55 +0200
commit0d81edcbba5149e46b11d447790f3a57a6eaa635 (patch)
treef5e4264fddefa3000e751f3f9d3c50f7048e6567
parented3da72583298ed04a488e363bd3fa6d69ade165 (diff)
downloadffmpeg-0d81edcbba5149e46b11d447790f3a57a6eaa635.tar.gz
lavc/opus: Reset alloc_trim when doing decoder bit-allocation.
Fixes ticket #8649. Reported-by: irc user Xogium
-rw-r--r--libavcodec/opus.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/opus.c b/libavcodec/opus.c
index f74278a7e3..64de246720 100644
--- a/libavcodec/opus.c
+++ b/libavcodec/opus.c
@@ -613,6 +613,8 @@ void ff_celt_bitalloc(CeltFrame *f, OpusRangeCoder *rc, int encode)
}
/* Allocation trim */
+ if (!encode)
+ f->alloc_trim = 5;
if (opus_rc_tell_frac(rc) + (6 << 3) <= tbits_8ths)
if (encode)
ff_opus_rc_enc_cdf(rc, f->alloc_trim, ff_celt_model_alloc_trim);