mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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:
parent
86c33cbb6e
commit
d3db3df320
1 changed files with 5 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue