shithub: opus

Download patch

ref: 37d9e1348d8a59f60f81323b998a4cbcc7db6194
parent: 03105f5b70f7597f36f4644f36a921317b859082
author: Jean-Marc Valin <[email protected]>
date: Wed Jul 11 11:53:39 EDT 2012

Fixes a hybrid encoder bug on 24 kHz stereo input

--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -366,10 +366,13 @@
 }
 
 static void stereo_fade(const opus_val16 *in, opus_val16 *out, opus_val16 g1, opus_val16 g2,
-        int overlap, int frame_size, int channels, const opus_val16 *window, opus_int32 Fs)
+        int overlap48, int frame_size, int channels, const opus_val16 *window, opus_int32 Fs)
 {
     int i;
-    int inc = 48000/Fs;
+    int overlap;
+    int inc;
+    inc = 48000/Fs;
+    overlap=overlap48/inc;
     g1 = Q15ONE-g1;
     g2 = Q15ONE-g2;
     for (i=0;i<overlap;i++)