[vlc-devel] [PATCH] misc/filter: remove assert from	filter_AddProxyCallbacks
    Victorien Le Couviour--Tuffet 
    victorien.lecouviour.tuffet at gmail.com
       
    Sun Jul  2 14:35:33 CEST 2017
    
    
  
When a filter fails to load we will try to prepand a converter and then try to
load it again (using video_chroma/chain.c). The filter object will be reused
for the chain, therefore if any variable is created in the pf_activate of the
filter, it will exist in both the chroma chain object and the filter object
(because we do not require a module to destroy its variables). This assert will
then fail.
---
 src/misc/filter.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/misc/filter.c b/src/misc/filter.c
index 7a2deb14ec..071e374ba4 100644
--- a/src/misc/filter.c
+++ b/src/misc/filter.c
@@ -56,7 +56,8 @@ void filter_AddProxyCallbacks( vlc_object_t *obj, filter_t *filter,
     {
         char *name = *pname;
         int var_type = var_Type(filter, name);
-        assert(var_Type(obj, name) == 0);
+        if (var_Type(obj, name))
+            continue;
         var_Create(obj, name,
                    var_type | VLC_VAR_DOINHERIT | VLC_VAR_ISCOMMAND);
         if ((var_type & VLC_VAR_ISCOMMAND))
-- 
2.13.1
    
    
More information about the vlc-devel
mailing list