From dd8929a272e5f2ba5a9c1a128be9cbab811db1f5 Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Tue, 6 May 2014 10:14:26 +0100 Subject: [PATCH] gl: delete texture used with GstVideoGLTextureUploadMeta --- gst-libs/gst/gl/gstglupload.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c index aa7dbdcfc1..05af11c27e 100644 --- a/gst-libs/gst/gl/gstglupload.c +++ b/gst-libs/gst/gl/gstglupload.c @@ -107,6 +107,7 @@ gst_gl_upload_init (GstGLUpload * upload) upload->priv = GST_GL_UPLOAD_GET_PRIVATE (upload); upload->context = NULL; + upload->priv->tex_id = 0; g_mutex_init (&upload->lock); } @@ -137,6 +138,11 @@ gst_gl_upload_finalize (GObject * object) upload = GST_GL_UPLOAD (object); + if (upload->priv->tex_id) { + gst_gl_context_del_texture (upload->context, &upload->priv->tex_id); + upload->priv->tex_id = 0; + } + if (upload->convert) { gst_object_unref (upload->convert); }