]> git.sesse.net Git - vlc/blobdiff - src/audio_output/mixer.c
Fixed vout reuse regression.
[vlc] / src / audio_output / mixer.c
index 9392d132e5e53fbac707259ab9e17fdb7dc74e8e..108e815a112148acd97fc86bdda6704bfe9f0100 100644 (file)
@@ -33,9 +33,6 @@
 #include <vlc_common.h>
 #include <libvlc.h>
 
-#ifdef HAVE_ALLOCA_H
-#   include <alloca.h>
-#endif
 #include <vlc_aout.h>
 #include "aout_internal.h"
 /*****************************************************************************
@@ -68,7 +65,6 @@ int aout_MixerNew( aout_instance_t * p_aout )
     if( !p_mixer->module )
     {
         msg_Err( p_aout, "no suitable audio mixer" );
-        vlc_object_detach( p_mixer );
         free( p_mixer->input );
         vlc_object_release( p_mixer );
         return VLC_EGENERIC;
@@ -89,8 +85,6 @@ void aout_MixerDelete( aout_instance_t * p_aout )
     if( !p_aout->p_mixer )
         return;
 
-    vlc_object_detach( p_aout->p_mixer );
-
     module_unneed( p_aout->p_mixer, p_aout->p_mixer->module );
 
     free( p_aout->p_mixer->input );
@@ -133,8 +127,8 @@ static int MixBuffer( aout_instance_t * p_aout )
     }
 
 
-    aout_lock_output_fifo( p_aout );
     aout_lock_input_fifos( p_aout );
+    aout_lock_output_fifo( p_aout );
 
     /* Retrieve the date of the next buffer. */
     exact_start_date = p_aout->output.fifo.end_date;