]> git.sesse.net Git - vlc/blobdiff - src/audio_output/dec.c
do not catch VLCException in sample
[vlc] / src / audio_output / dec.c
index 24e59b27a1c50da46135206fdd2f5d733fc406e7..694957e0b7ead9d68b20392923906e87aab54e2f 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <vlc/vlc.h>
 
 #ifdef HAVE_ALLOCA_H
@@ -47,7 +51,6 @@ static aout_input_t * DecNew( vlc_object_t * p_this, aout_instance_t * p_aout,
 {
     aout_input_t * p_input;
     input_thread_t * p_input_thread;
-    vlc_value_t val;
 
     /* Sanitize audio format */
     if( p_format->i_channels > 32 )
@@ -86,7 +89,9 @@ static aout_input_t * DecNew( vlc_object_t * p_this, aout_instance_t * p_aout,
 
     p_input->b_changed = 0;
     p_input->b_error = 1;
+
     aout_FormatPrepare( p_format );
+
     memcpy( &p_input->input, p_format,
             sizeof(audio_sample_format_t) );
     if( p_replay_gain )
@@ -138,9 +143,7 @@ static aout_input_t * DecNew( vlc_object_t * p_this, aout_instance_t * p_aout,
     aout_InputNew( p_aout, p_input );
 
     vlc_mutex_unlock( &p_aout->mixer_lock );
-    var_Create( p_this, "audio-desync", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
-    var_Get( p_this, "audio-desync", &val );
-    p_input->i_desync = val.i_int * 1000;
+    p_input->i_desync = var_CreateGetInteger( p_this, "audio-desync" ) * 1000;
 
     p_input_thread = (input_thread_t *)vlc_object_find( p_this,
                                            VLC_OBJECT_INPUT, FIND_PARENT );
@@ -258,8 +261,7 @@ int aout_DecDelete( aout_instance_t * p_aout, aout_input_t * p_input )
 /*****************************************************************************
  * aout_DecNewBuffer : ask for a new empty buffer
  *****************************************************************************/
-aout_buffer_t * aout_DecNewBuffer( aout_instance_t * p_aout,
-                                   aout_input_t * p_input,
+aout_buffer_t * aout_DecNewBuffer( aout_input_t * p_input,
                                    size_t i_nb_samples )
 {
     aout_buffer_t * p_buffer;