[vlc-commits] opengl: use a specific release callback for persistent

Thomas Guillem git at videolan.org
Fri Mar 10 18:50:18 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Mar 10 09:34:55 2017 +0100| [350b0c07313da08508bf3c352b2ece206dd3592f] | committer: Thomas Guillem

opengl: use a specific release callback for persistent

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=350b0c07313da08508bf3c352b2ece206dd3592f
---

 modules/video_output/opengl/converters.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/modules/video_output/opengl/converters.c b/modules/video_output/opengl/converters.c
index dbafcc3..f9f2d7c 100644
--- a/modules/video_output/opengl/converters.c
+++ b/modules/video_output/opengl/converters.c
@@ -669,6 +669,13 @@ tc_persistent_update(const opengl_tex_converter_t *tc, GLuint *textures,
 }
 
 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)
 {
     picture_sys_t *picsys = pic->p_sys;
@@ -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



More information about the vlc-commits mailing list