mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
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.
This commit is contained in:
parent
3eab72f409
commit
22a1ec13b6
1 changed files with 5 additions and 10 deletions
|
@ -417,6 +417,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");
|
||||
|
@ -588,11 +593,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;
|
||||
}
|
||||
|
||||
|
@ -684,11 +684,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;
|
||||
|
|
Loading…
Reference in a new issue