Browse Source

lavc/opus: Reset alloc_trim when doing decoder bit-allocation.

Fixes ticket #8649.
Reported-by: irc user Xogium
tags/n4.3
Carl Eugen Hoyos 5 years ago
parent
commit
0d81edcbba
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/opus.c

+ 2
- 0
libavcodec/opus.c View 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);


Loading…
Cancel
Save