Don't print (null) when we don't have a filter name.
authorAntoine Cellerier <dionoea@videolan.org>
Sun, 22 Jun 2008 19:30:39 +0000 (21:30 +0200)
committerAntoine Cellerier <dionoea@videolan.org>
Sun, 22 Jun 2008 19:30:39 +0000 (21:30 +0200)
src/misc/filter_chain.c

index ec73a8a..7c20453 100644 (file)
@@ -170,13 +170,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 );