Fix corner-case hybrid encoding desync introduced by e5736ae2
authorGregory Maxwell <greg@xiph.org>
Mon, 5 Sep 2011 15:28:28 +0000 (11:28 -0400)
committerGregory Maxwell <greg@xiph.org>
Mon, 5 Sep 2011 15:28:28 +0000 (11:28 -0400)
src/opus_encoder.c

index a30e1cd..00f8a1c 100644 (file)
@@ -804,11 +804,12 @@ int opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_size,
             if (st->mode == MODE_HYBRID)
                 ec_enc_uint(&enc, redundancy_bytes-2, 256);
         }
-        start_band = 17;
     } else {
         redundancy = 0;
     }
 
+    if (st->mode != MODE_CELT_ONLY)start_band=17;
+
     if (st->mode == MODE_SILK_ONLY)
     {
         ret = (ec_tell(&enc)+7)>>3;