lavc/opus: Reset alloc_trim when doing decoder bit-allocation.
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>
Sat, 2 May 2020 08:09:01 +0000 (10:09 +0200)
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>
Sat, 2 May 2020 08:51:55 +0000 (10:51 +0200)
Fixes ticket #8649.
Reported-by: irc user Xogium
libavcodec/opus.c

index f74278a..64de246 100644 (file)
@@ -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);