mirror of
https://github.com/mpv-player/mpv
synced 2024-12-23 23:32:26 +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:
parent
943a50b300
commit
637bc6994f
@ -367,6 +367,8 @@ static void decf_destroy(struct mp_filter *f)
|
|||||||
MP_DBG(f, "Uninit decoder.\n");
|
MP_DBG(f, "Uninit decoder.\n");
|
||||||
talloc_free(p->decoder->f);
|
talloc_free(p->decoder->f);
|
||||||
p->decoder = NULL;
|
p->decoder = NULL;
|
||||||
|
p->codec->decoder = NULL;
|
||||||
|
p->codec->decoder_desc = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
decf_reset(f);
|
decf_reset(f);
|
||||||
|
Loading…
Reference in New Issue
Block a user