[xiph-commits] r14796 - trunk/speex/src

jm at svn.xiph.org jm at svn.xiph.org
Fri Apr 25 04:10:23 PDT 2008


Author: jm
Date: 2008-04-25 04:10:22 -0700 (Fri, 25 Apr 2008)
New Revision: 14796

Modified:
   trunk/speex/src/speexdec.c
Log:
Fixed a speexdec regression causing all files to be decoded by as stereo (oops!)


Modified: trunk/speex/src/speexdec.c
===================================================================
--- trunk/speex/src/speexdec.c	2008-04-24 22:27:27 UTC (rev 14795)
+++ trunk/speex/src/speexdec.c	2008-04-25 11:10:22 UTC (rev 14796)
@@ -363,14 +363,6 @@
    speex_decoder_ctl(st, SPEEX_GET_FRAME_SIZE, frame_size);
    *granule_frame_size = *frame_size;
 
-   if (!(*channels==1))
-   {
-      *channels = 2;
-      callback.callback_id = SPEEX_INBAND_STEREO;
-      callback.func = speex_std_stereo_request_handler;
-      callback.data = stereo;
-      speex_decoder_ctl(st, SPEEX_SET_HANDLER, &callback);
-   }
    if (!*rate)
       *rate = header->rate;
    /* Adjust rate if --force-* options are used */
@@ -395,6 +387,15 @@
 
    if (*channels==-1)
       *channels = header->nb_channels;
+
+   if (!(*channels==1))
+   {
+      *channels = 2;
+      callback.callback_id = SPEEX_INBAND_STEREO;
+      callback.func = speex_std_stereo_request_handler;
+      callback.data = stereo;
+      speex_decoder_ctl(st, SPEEX_SET_HANDLER, &callback);
+   }
    
    if (!quiet)
    {



More information about the commits mailing list