]> git.sesse.net Git - vlc/commitdiff
* Fixed dual-mono handling of MPEG audio.
authorChristophe Massiot <massiot@videolan.org>
Tue, 14 Jan 2003 14:51:02 +0000 (14:51 +0000)
committerChristophe Massiot <massiot@videolan.org>
Tue, 14 Jan 2003 14:51:02 +0000 (14:51 +0000)
* rc.c: fixed a warning.

modules/audio_filter/channel_mixer/trivial.c
modules/control/rc/rc.c

index 36d4c087a9c3bf97737d7d07b1a485f1b3654e08..5c257faa27ca80d5c9270389e9e975cee2d9cf72 100644 (file)
@@ -2,7 +2,7 @@
  * trivial.c : trivial channel mixer plug-in (drops unwanted channels)
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: trivial.c,v 1.8 2002/12/04 21:48:02 gbazin Exp $
+ * $Id: trivial.c,v 1.9 2003/01/14 14:51:02 massiot Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -113,7 +113,10 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
     s32 * p_dest = (s32 *)p_out_buf->p_buffer;
     s32 * p_src = (s32 *)p_in_buf->p_buffer;
 
-    if ( p_filter->output.i_original_channels & AOUT_CHAN_DUALMONO )
+    if ( (p_filter->output.i_original_channels & AOUT_CHAN_PHYSMASK)
+                != (p_filter->input.i_original_channels & AOUT_CHAN_PHYSMASK)
+           && (p_filter->input.i_original_channels & AOUT_CHAN_PHYSMASK)
+                == (AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT) )
     { 
         int i;
         /* This is a bit special. */
index a27947d595f4ba5ae64eb5310311114dcd992e19..8d8f140e6dfdaad9c61a87336cfdd86484c52213 100644 (file)
@@ -2,7 +2,7 @@
  * rc.c : remote control stdin/stdout plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: rc.c,v 1.18 2003/01/14 01:30:09 sigmunau Exp $
+ * $Id: rc.c,v 1.19 2003/01/14 14:51:02 massiot Exp $
  *
  * Authors: Peter Surda <shurdeek@panorama.sth.ac.at>
  *
@@ -435,8 +435,8 @@ static void Run( intf_thread_t *p_intf )
     }
 }
 
-static int Input(  vlc_object_t *p_this, char const *psz_cmd,
-                     vlc_value_t oldval, vlc_value_t newval, void *p_data )
+static int Input( vlc_object_t *p_this, char const *psz_cmd,
+                  vlc_value_t oldval, vlc_value_t newval, void *p_data )
 {
     input_thread_t * p_input;
 
@@ -555,12 +555,12 @@ static int Input(  vlc_object_t *p_this, char const *psz_cmd,
         if( ( i_title > 0 ) && ( i_title <=
             p_input->stream.p_selected_area->i_part_nb ) )
         {
-          p_input->stream.p_selected_area->i_part = i_title;
-          vlc_mutex_unlock( &p_input->stream.stream_lock );
-          input_ChangeArea( p_input,
-                            (input_area_t*)p_input->stream.pp_areas[i_title] );
-          input_SetStatus( p_input, INPUT_STATUS_PLAY );
-          vlc_mutex_lock( &p_input->stream.stream_lock );
+            p_input->stream.p_selected_area->i_part = i_title;
+            vlc_mutex_unlock( &p_input->stream.stream_lock );
+            input_ChangeArea( p_input,
+                     (input_area_t*)p_input->stream.pp_areas[i_title] );
+            input_SetStatus( p_input, INPUT_STATUS_PLAY );
+            vlc_mutex_lock( &p_input->stream.stream_lock );
         }
         vlc_mutex_unlock( &p_input->stream.stream_lock );
 
@@ -568,6 +568,8 @@ static int Input(  vlc_object_t *p_this, char const *psz_cmd,
         return VLC_SUCCESS;
     }
 
+    /* Never reached. */
+    return VLC_EGENERIC;
 }
 
 static int Playlist( vlc_object_t *p_this, char const *psz_cmd,