glimagesink: Make sure to always unref the display

Even if we didn't create a context yet.
This commit is contained in:
Sebastian Dröge 2014-06-29 22:25:43 +02:00 committed by Tim-Philipp Müller
parent 7ba2288f3e
commit 8f6224c0ed

View file

@ -587,6 +587,9 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition)
gst_object_unref (window); gst_object_unref (window);
gst_object_unref (glimage_sink->context); gst_object_unref (glimage_sink->context);
glimage_sink->context = NULL; glimage_sink->context = NULL;
}
if (glimage_sink->display) {
gst_object_unref (glimage_sink->display); gst_object_unref (glimage_sink->display);
glimage_sink->display = NULL; glimage_sink->display = NULL;
} }