]> git.sesse.net Git - vlc/blobdiff - modules/audio_mixer/spdif.c
Merge branch 'base' into master
[vlc] / modules / audio_mixer / spdif.c
index 516a23041654d9913ea4a21968ff4421dd8300cb..f74f4212c01470c4fb81334fbaf4abd22e65439f 100644 (file)
@@ -10,7 +10,7 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * Preamble
  *****************************************************************************/
 
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_aout.h>
 
 /*****************************************************************************
@@ -38,13 +43,13 @@ static void DoWork    ( aout_instance_t *, aout_buffer_t * );
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
-vlc_module_begin();
-    set_category( CAT_AUDIO );
-    set_subcategory( SUBCAT_AUDIO_MISC );
-    set_description( _("Dummy S/PDIF audio mixer") );
-    set_capability( "audio mixer", 1 );
-    set_callbacks( Create, NULL );
-vlc_module_end();
+vlc_module_begin ()
+    set_category( CAT_AUDIO )
+    set_subcategory( SUBCAT_AUDIO_MISC )
+    set_description( N_("Dummy S/PDIF audio mixer") )
+    set_capability( "audio mixer", 1 )
+    set_callbacks( Create, NULL )
+vlc_module_end ()
 
 /*****************************************************************************
  * Create: allocate spdif mixer
@@ -73,7 +78,7 @@ static void DoWork( aout_instance_t * p_aout, aout_buffer_t * p_buffer )
 {
     int i = 0;
     aout_input_t * p_input = p_aout->pp_inputs[i];
-    while ( p_input->b_error )
+    while ( p_input->b_error || p_input->b_paused )
     {
         p_input = p_aout->pp_inputs[++i];
     }
@@ -86,9 +91,10 @@ static void DoWork( aout_instance_t * p_aout, aout_buffer_t * p_buffer )
         aout_buffer_t * p_deleted;
 
         p_input = p_aout->pp_inputs[i];
-        if ( p_input->b_error ) continue;
+        if ( p_input->b_error || p_input->b_paused )
+            continue;
         p_fifo = &p_input->fifo;
-        p_deleted = p_fifo->p_first;  
+        p_deleted = p_fifo->p_first;
         while ( p_deleted != NULL )
         {
             aout_buffer_t * p_next = p_deleted->p_next;