summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2015-12-25 12:51:45 -0500
committerJean-Marc Valin <jmvalin@jmvalin.ca>2015-12-25 12:51:45 -0500
commit8ea3e17b96f1ac872cd351ed0823e74f9e618002 (patch)
tree7cd553a55e245ee0718cdc57adfec5b6987440a4
parent9818ac9a6c67050fa36566e7abc14f922168fef5 (diff)
downloadopus-8ea3e17b96f1ac872cd351ed0823e74f9e618002.tar.gz
comment
-rw-r--r--celt/celt_encoder.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/celt/celt_encoder.c b/celt/celt_encoder.c
index a41dfc48..1f164117 100644
--- a/celt/celt_encoder.c
+++ b/celt/celt_encoder.c
@@ -1948,7 +1948,9 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
The margin of 2 bytes ensures that none of the bust-prevention logic
in the decoder will have triggered so far. */
min_allowed = ((tell+total_boost+(1<<(BITRES+3))-1)>>(BITRES+3)) + 2;
- /* Take into account */
+ /* Take into account the 37 bits we need to have left in the packet to
+ signal a redundant frame in hybrid mode. Creating a shorter packet would
+ create an entropy coder desync. */
if (hybrid)
min_allowed = IMAX(min_allowed, (tell0_frac+(37<<BITRES)+total_boost+(1<<(BITRES+3))-1)>>(BITRES+3));