summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-10-13 13:28:57 +0200
committerSebastian Dröge <sebastian@centricular.com>2014-10-14 10:02:56 +0200
commit028ccece2e38dfa370db85a8c80b9f7cc7b313c6 (patch)
tree939d0ad5a0734bfe21dd891bdf5d1a6ff6198d85
parentaa57d9eb70c8738deca46ae32b1886620d6a61f4 (diff)
downloadgstreamer-plugins-bad-028ccece2e38dfa370db85a8c80b9f7cc7b313c6.tar.gz
glimagesink: Only finalize the other context in finalize()
Otherwise we change a value of a property when going to READY state, which is unexpected behaviour.
-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;