1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-19 13:21:13 +00:00

f_decoder_wrapper: clear decoder info on deinit

It is not longer valid and may cause use-after-free if used after
decoder itself is destroyed.

Fixes: #14051
This commit is contained in:
Kacper Michajłow 2024-05-04 00:13:50 +02:00 committed by sfan5
parent 943a50b300
commit 637bc6994f

View File

@ -367,6 +367,8 @@ static void decf_destroy(struct mp_filter *f)
MP_DBG(f, "Uninit decoder.\n");
talloc_free(p->decoder->f);
p->decoder = NULL;
p->codec->decoder = NULL;
p->codec->decoder_desc = NULL;
}
decf_reset(f);