diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2012-11-09 02:22:07 +0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2012-11-09 02:22:07 +0400 |
commit | 1fd1d7dd49c34c7d64bf26f60782afc17dab6842 (patch) | |
tree | 23dec5287f24a37a3d5494dd4ae6b0c5e9fdc0c6 /celt | |
parent | a6d663c6ae089b0a9682c848f3ff7701b316526f (diff) |
Fixes a bug where transient frames would use previous spreading
Also forces SPREAD_NORMAL in hybrid mode
Diffstat (limited to 'celt')
-rw-r--r-- | celt/celt_encoder.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/celt/celt_encoder.c b/celt/celt_encoder.c index 994d664b..d6bae410 100644 --- a/celt/celt_encoder.c +++ b/celt/celt_encoder.c @@ -1282,10 +1282,12 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, if (ec_tell(enc)+4<=total_bits) { - if (shortBlocks || st->complexity < 3 || nbAvailableBytes < 10*C) + if (shortBlocks || st->complexity < 3 || nbAvailableBytes < 10*C || st->start != 0) { if (st->complexity == 0) st->spread_decision = SPREAD_NONE; + else + st->spread_decision = SPREAD_NORMAL; } else { if (st->analysis.valid) { |