Commit 350b0c07 authored by Thomas Guillem's avatar Thomas Guillem

opengl: use a specific release callback for persistent

parent cdaf0134
......@@ -668,6 +668,13 @@ tc_persistent_update(const opengl_tex_converter_t *tc, GLuint *textures,
return VLC_SUCCESS;
}
static void
tc_persistent_release(const opengl_tex_converter_t *tc)
{
persistent_release_gpupics(tc, true);
free(tc->priv);
}
static void
picture_persistent_destroy_cb(picture_t *pic)
{
......@@ -839,11 +846,6 @@ tc_common_release(const opengl_tex_converter_t *tc)
{
struct priv *priv = tc->priv;
free(priv->texture_temp_buf);
#ifdef VLCGL_HAS_MAP_PERSISTENT
persistent_release_gpupics(tc, true);
#endif
free(tc->priv);
}
......@@ -981,6 +983,7 @@ generic_init(const video_format_t *fmt, opengl_tex_converter_t *tc,
{
tc->pf_get_pool = tc_persistent_get_pool;
tc->pf_update = tc_persistent_update;
tc->pf_release = tc_persistent_release;
msg_Dbg(tc->gl, "MAP_PERSISTENT support (direct rendering) enabled");
}
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment