1
mirror of https://github.com/mpv-player/mpv synced 2024-11-14 22:48:35 +01:00

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.
This commit is contained in:
wm4 2020-03-18 22:31:17 +01:00
parent 41e96d8b6b
commit 373dad9962

View File

@ -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);