]> git.sesse.net Git - vlc/blobdiff - src/misc/filter_chain.c
Dutch l10n update by Myckel Habets
[vlc] / src / misc / filter_chain.c
index ec73a8abaa2ad650d681947eb01c1d7b3de0b7f8..11f3af3d6454b65b7f91949017eaefb878f6f251 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <vlc_filter.h>
 #include <vlc_arrays.h>
+#include <libvlc.h>
 
 struct filter_chain_t
 {
@@ -128,8 +133,10 @@ static filter_t *filter_chain_AppendFilterInternal( filter_chain_t *p_chain,
                                                     const es_format_t *p_fmt_in,
                                                     const es_format_t *p_fmt_out )
 {
+    static const char typename[] = "filter";
     filter_t *p_filter =
-        vlc_object_create( p_chain->p_this, VLC_OBJECT_FILTER );
+        vlc_custom_create( p_chain->p_this, sizeof(filter_t),
+                           VLC_OBJECT_GENERIC, typename );
     if( !p_filter ) return NULL;
     vlc_object_attach( p_filter, p_chain->p_this );
 
@@ -170,13 +177,16 @@ static filter_t *filter_chain_AppendFilterInternal( filter_chain_t *p_chain,
     vlc_array_append( &p_chain->filters, p_filter );
 
     msg_Dbg( p_chain->p_this, "Filter '%s' (%p) appended to chain",
-             psz_name, p_filter );
+             psz_name?:p_filter->psz_object_name, p_filter );
 
     return p_filter;
 
     error:
-        msg_Err( p_chain->p_this, "Failed to create video filter '%s'",
-                 psz_name );
+        if( psz_name )
+            msg_Err( p_chain->p_this, "Failed to create video filter '%s'",
+                     psz_name );
+        else
+            msg_Err( p_chain->p_this, "Failed to create video filter" );
         if( p_filter->p_module ) module_Unneed( p_filter,
                                                 p_filter->p_module );
         es_format_Clean( &p_filter->fmt_in );