summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/gl/gstglimagesink.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c
index a7162ee58..41409a96b 100644
--- a/ext/gl/gstglimagesink.c
+++ b/ext/gl/gstglimagesink.c
@@ -358,6 +358,11 @@ gst_glimage_sink_finalize (GObject * object)
g_mutex_clear (&glimage_sink->drawing_lock);
+ if (glimage_sink->other_context) {
+ gst_object_unref (glimage_sink->other_context);
+ glimage_sink->other_context = NULL;
+ }
+
g_free (glimage_sink->display_name);
GST_DEBUG ("finalized");
@@ -503,11 +508,6 @@ gst_glimage_sink_stop (GstBaseSink * bsink)
glimage_sink->pool = NULL;
}
- if (glimage_sink->other_context) {
- gst_object_unref (glimage_sink->other_context);
- glimage_sink->other_context = NULL;
- }
-
return TRUE;
}
@@ -598,11 +598,6 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition)
glimage_sink->context = NULL;
}
- if (glimage_sink->other_context) {
- gst_object_unref (glimage_sink->other_context);
- glimage_sink->other_context = NULL;
- }
-
if (glimage_sink->display) {
gst_object_unref (glimage_sink->display);
glimage_sink->display = NULL;