[vlc-commits] misc/filter: remove assert from filter_AddProxyCallbacks
Victorien Le Couviour--Tuffet
git at videolan.org
Sun Jul 2 15:12:29 CEST 2017
vlc | branch: master | Victorien Le Couviour--Tuffet <victorien.lecouviour.tuffet at gmail.com> | Sun Jul 2 14:35:33 2017 +0200| [856cedf9ea820d596ed5d65b97fb981bf179a20c] | committer: Thomas Guillem
misc/filter: remove assert from filter_AddProxyCallbacks
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.
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=856cedf9ea820d596ed5d65b97fb981bf179a20c
---
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))
More information about the vlc-commits
mailing list