shithub: opus

Download patch

ref: 9a16e7f9447562313348d3d9606ee2f83c7e52f5
parent: 454d3d595923306503fdcf083258f9558742d30d
author: Jean-Marc Valin <[email protected]>
date: Tue Sep 18 23:28:58 EDT 2012

Fixes a CELT->hybrid switching issue

Prefilling didn't use the right offset because of the extra_delay
changes introduced in the analysis branch.

--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -1136,7 +1136,7 @@
     if (st->mode != MODE_SILK_ONLY && st->mode != st->prev_mode && st->prev_mode > 0)
     {
        for (i=0;i<st->channels*st->Fs/400;i++)
-          tmp_prefill[i] = st->delay_buffer[(st->encoder_buffer-total_buffer-st->Fs/400)*st->channels + i];
+          tmp_prefill[i] = st->delay_buffer[(extra_buffer+st->encoder_buffer-total_buffer-st->Fs/400)*st->channels + i];
     }
 
     for (i=0;i<st->channels*(st->encoder_buffer-(frame_size+total_buffer));i++)