[vlc-commits] Remove aout_output_t.b_error

Rémi Denis-Courmont git at videolan.org
Mon May 30 17:21:05 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon May 30 17:26:41 2011 +0300| [0707bc75cb04b62dc0cb5bfcefaeb534b9569b15] | committer: Rémi Denis-Courmont

Remove aout_output_t.b_error

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0707bc75cb04b62dc0cb5bfcefaeb534b9569b15
---

 include/vlc_aout.h        |    3 ---
 src/audio_output/common.c |    2 +-
 src/audio_output/output.c |   11 +++--------
 3 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/include/vlc_aout.h b/include/vlc_aout.h
index a10f5de..c740311 100644
--- a/include/vlc_aout.h
+++ b/include/vlc_aout.h
@@ -199,9 +199,6 @@ typedef struct aout_output_t
     void                 (* pf_play)( aout_instance_t * );
     int                  (* pf_volume_set )( aout_instance_t *, audio_volume_t, bool );
     int                     i_nb_samples;
-
-    /* If b_error == 1, there is no audio output pipeline. */
-    bool              b_error;
 } aout_output_t;
 
 struct aout_mixer_t;
diff --git a/src/audio_output/common.c b/src/audio_output/common.c
index ea6a930..c29f33f 100644
--- a/src/audio_output/common.c
+++ b/src/audio_output/common.c
@@ -95,8 +95,8 @@ aout_instance_t * __aout_New( vlc_object_t * p_parent )
     p_aout->i_nb_inputs = 0;
     p_aout->mixer_multiplier = 1.0;
     p_aout->p_mixer = NULL;
-    p_aout->output.b_error = 1;
     p_aout->output.b_starving = 1;
+    p_aout->output.p_module = NULL;
 
     var_Create( p_aout, "intf-change", VLC_VAR_VOID );
 
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 368d185..6b69739 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -193,6 +193,7 @@ int aout_OutputNew( aout_instance_t * p_aout,
     {
         msg_Err( p_aout, "couldn't create audio output pipeline" );
         module_unneed( p_aout, p_aout->output.p_module );
+        p_aout->output.p_module = NULL;
         return -1;
     }
 
@@ -206,8 +207,6 @@ int aout_OutputNew( aout_instance_t * p_aout,
     aout_FiltersHintBuffers( p_aout, p_aout->output.pp_filters,
                              p_aout->output.i_nb_filters,
                              &p_aout->mixer_allocation );
-
-    p_aout->output.b_error = 0;
     return 0;
 }
 
@@ -218,12 +217,10 @@ int aout_OutputNew( aout_instance_t * p_aout,
  *****************************************************************************/
 void aout_OutputDelete( aout_instance_t * p_aout )
 {
-    if ( p_aout->output.b_error )
-    {
-        return;
-    }
+    if( p_aout->output.p_module == NULL )
 
     module_unneed( p_aout, p_aout->output.p_module );
+    p_aout->output.p_module = NULL;
 
     aout_FiltersDestroyPipeline( p_aout, p_aout->output.pp_filters,
                                  p_aout->output.i_nb_filters );
@@ -231,8 +228,6 @@ void aout_OutputDelete( aout_instance_t * p_aout )
     aout_lock_output_fifo( p_aout );
     aout_FifoDestroy( p_aout, &p_aout->output.fifo );
     aout_unlock_output_fifo( p_aout );
-
-    p_aout->output.b_error = true;
 }
 
 /*****************************************************************************



More information about the vlc-commits mailing list