diff options
author | wm4 <wm4@nowhere> | 2020-03-18 22:31:17 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-03-18 22:31:17 +0100 |
commit | 373dad9962e4d7b23b95fc95bbbe811c8adafc92 (patch) | |
tree | 277e0ed2f8886ca4e9452fb4f2734d006af23f5c /filters/f_decoder_wrapper.c | |
parent | 41e96d8b6bdef6afffe8fc89b2f09cae31e9a8da (diff) | |
download | mpv-373dad9962e4d7b23b95fc95bbbe811c8adafc92.tar.bz2 mpv-373dad9962e4d7b23b95fc95bbbe811c8adafc92.tar.xz |
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.
Diffstat (limited to 'filters/f_decoder_wrapper.c')
-rw-r--r-- | filters/f_decoder_wrapper.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |