vo_gpu_next: fix some lut-related memory leaks

This commit is contained in:
Dudemanguy 2024-02-17 10:41:59 -06:00
parent 85e84f6d92
commit bd5b80ba2c
1 changed files with 5 additions and 0 deletions

View File

@ -1752,6 +1752,10 @@ static void uninit(struct vo *vo)
cache_uninit(p, &p->shader_cache);
cache_uninit(p, &p->icc_cache);
pl_lut_free(&p->next_opts->image_lut.lut);
pl_lut_free(&p->next_opts->lut.lut);
pl_lut_free(&p->next_opts->target_lut.lut);
pl_icc_close(&p->icc_profile);
pl_renderer_destroy(&p->rr);
@ -1993,6 +1997,7 @@ static void update_lut(struct priv *p, struct user_lut *lut)
MP_VERBOSE(p, "Loading custom LUT '%s'\n", fname);
struct bstr lutdata = stream_read_file(fname, p, p->global, 100000000); // 100 MB
lut->lut = pl_lut_parse_cube(p->pllog, lutdata.start, lutdata.len);
talloc_free(fname);
talloc_free(lutdata.start);
}