From 373dad9962e4d7b23b95fc95bbbe811c8adafc92 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 18 Mar 2020 22:31:17 +0100 Subject: f_decoder_wrapper: fix use of destroyed mutex After calling the main filter's destroy callback, all child filters are destroyed. But one of them still tried to access the cache_lock mutex (which is destroyed in said destroy callback). This actually caused a crash on Android with _FORTIFY_SOURCE. Fix this by destroying the child filters first. --- filters/f_decoder_wrapper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/filters/f_decoder_wrapper.c b/filters/f_decoder_wrapper.c index d96c780e9c..3f7fe50aad 100644 --- a/filters/f_decoder_wrapper.c +++ b/filters/f_decoder_wrapper.c @@ -1119,6 +1119,8 @@ static void public_f_destroy(struct mp_filter *f) p->dec_thread_valid = false; } + mp_filter_free_children(f); + talloc_free(p->dec_root_filter); talloc_free(p->queue); pthread_mutex_destroy(&p->cache_lock); -- cgit v1.2.3