[clutter-gst/clutter-gst-2.0] video-sink: unref material template in dispose



commit 0be362028776f63f4902406dd83612858ae50630
Author: Lionel Landwerlin <llandwerlin gmail com>
Date:   Mon Dec 16 14:00:31 2013 +0000

    video-sink: unref material template in dispose

 clutter-gst/clutter-gst-video-sink.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c
index 88430db..894717b 100644
--- a/clutter-gst/clutter-gst-video-sink.c
+++ b/clutter-gst/clutter-gst-video-sink.c
@@ -742,7 +742,6 @@ _create_template_material (ClutterGstVideoSink * sink,
     }
 
     cogl_material_set_user_program (template, program);
-    cogl_handle_unref (program);
   }
 
   for (i = 0; i < n_layers; i++)
@@ -1489,6 +1488,11 @@ clutter_gst_video_sink_dispose (GObject * object)
   self = CLUTTER_GST_VIDEO_SINK (object);
   priv = self->priv;
 
+  if (priv->material_template != COGL_INVALID_HANDLE) {
+    cogl_object_unref (priv->material_template);
+    priv->material_template = COGL_INVALID_HANDLE;
+  }
+
   if (priv->renderer) {
     priv->renderer->deinit (self);
     priv->renderer = NULL;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]