waylandsink: Add exception code for setting wl_display

Waylandsink needs exception code in gst_wayland_sink_set_context(). After
calling gst_wayland_sink_set_context(), below code is set.
GST_ELEMENT_CLASS (parent_class)->set_context (element, context); but, If
user can call onemore. It is user's fault. but waylandsink need to
exception.

https://bugzilla.gnome.org/show_bug.cgi?id=747482
This commit is contained in:
Hyunil Park 2015-04-09 13:17:01 +09:00 committed by Luis de Bethencourt
parent 86c33cbb6e
commit d3db3df320

View file

@ -364,10 +364,13 @@ gst_wayland_sink_set_context (GstElement * element, GstContext * context)
if (gst_context_has_context_type (context,
GST_WAYLAND_DISPLAY_HANDLE_CONTEXT_TYPE)) {
g_mutex_lock (&sink->display_lock);
if (G_LIKELY (!sink->display))
if (G_LIKELY (!sink->display)) {
gst_wayland_sink_set_display_from_context (sink, context);
else
} else {
GST_WARNING_OBJECT (element, "changing display handle is not supported");
g_mutex_unlock (&sink->display_lock);
return;
}
g_mutex_unlock (&sink->display_lock);
}