faad: sets physical channel configuration in all cases
authorRafaël Carré <funman@videolan.org>
Thu, 10 Apr 2008 13:11:20 +0000 (15:11 +0200)
committerRafaël Carré <funman@videolan.org>
Thu, 10 Apr 2008 13:11:20 +0000 (15:11 +0200)
modules/codec/faad.c

index 4f2bb9f..6434286 100644 (file)
@@ -266,6 +266,10 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
         {
             p_dec->fmt_out.audio.i_rate = i_rate;
             p_dec->fmt_out.audio.i_channels = i_channels;
+            p_dec->fmt_out.audio.i_physical_channels
+                = p_dec->fmt_out.audio.i_original_channels
+                = pi_channels_guessed[i_channels];
+
             aout_DateInit( &p_sys->date, i_rate );
         }
     }
@@ -286,6 +290,9 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
 
         p_dec->fmt_out.audio.i_rate = i_rate;
         p_dec->fmt_out.audio.i_channels = i_channels;
+        p_dec->fmt_out.audio.i_physical_channels
+            = p_dec->fmt_out.audio.i_original_channels
+            = pi_channels_guessed[i_channels];
         aout_DateInit( &p_sys->date, i_rate );
     }
 
@@ -362,6 +369,9 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
 
         p_dec->fmt_out.audio.i_rate = frame.samplerate;
         p_dec->fmt_out.audio.i_channels = frame.channels;
+        p_dec->fmt_out.audio.i_physical_channels
+            = p_dec->fmt_out.audio.i_original_channels
+            = pi_channels_guessed[frame.channels];
 
         /* Adjust stream info when dealing with SBR/PS */
         if( (p_sys->b_sbr != frame.sbr || p_sys->b_ps != frame.ps) &&