]> git.sesse.net Git - vlc/blobdiff - src/audio_output/filters.c
lua/intf: Fix a memleak.
[vlc] / src / audio_output / filters.c
index de89d314462628c933fc07d80a2743ac912eae80..14aca008c7f3b7a2bbff01d8a7719cb9f6fd3fba 100644 (file)
@@ -37,6 +37,7 @@
 
 #include <vlc_aout.h>
 #include "aout_internal.h"
+#include <libvlc.h>
 
 /*****************************************************************************
  * FindFilter: find an audio filter for a specific transformation
@@ -45,8 +46,11 @@ static aout_filter_t * FindFilter( aout_instance_t * p_aout,
                              const audio_sample_format_t * p_input_format,
                              const audio_sample_format_t * p_output_format )
 {
-    aout_filter_t * p_filter = vlc_object_create( p_aout,
-                                                  sizeof(aout_filter_t) );
+    static const char typename[] = "audio output";
+    aout_filter_t * p_filter;
+
+    p_filter = vlc_custom_create( p_aout, sizeof(*p_filter),
+                                  VLC_OBJECT_GENERIC, typename );
 
     if ( p_filter == NULL ) return NULL;
     vlc_object_attach( p_filter, p_aout );
@@ -343,10 +347,7 @@ void aout_FiltersPlay( aout_instance_t * p_aout,
             * 1000000 / p_filter->input.i_rate,
             *pp_input_buffer, p_output_buffer );
         if ( p_output_buffer == NULL )
-        {
-            msg_Err( p_aout, "out of memory" );
             return;
-        }
         /* Please note that p_output_buffer->i_nb_samples & i_nb_bytes
          * shall be set by the filter plug-in. */