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
1 changed files with 2 additions and 0 deletions

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