mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
waylandsink: fix display re-connection (redraw pending)
Reset redraw_pending at display disconnection, so we can re-connect later from a clean state (avoid endless buffer drops). Add a log to inform of dropped buffers. https://bugzilla.gnome.org/show_bug.cgi?id=775791
This commit is contained in:
parent
8f674a3639
commit
e2fba40038
1 changed files with 6 additions and 1 deletions
|
@ -349,6 +349,9 @@ gst_wayland_sink_change_state (GstElement * element, GstStateChange transition)
|
|||
*/
|
||||
if (sink->display && !sink->window) { /* -> the window was toplevel */
|
||||
g_clear_object (&sink->display);
|
||||
g_mutex_lock (&sink->render_lock);
|
||||
sink->redraw_pending = FALSE;
|
||||
g_mutex_unlock (&sink->render_lock);
|
||||
}
|
||||
g_mutex_unlock (&sink->display_lock);
|
||||
g_clear_object (&sink->pool);
|
||||
|
@ -617,8 +620,10 @@ gst_wayland_sink_show_frame (GstVideoSink * vsink, GstBuffer * buffer)
|
|||
}
|
||||
|
||||
/* drop buffers until we get a frame callback */
|
||||
if (sink->redraw_pending)
|
||||
if (sink->redraw_pending) {
|
||||
GST_LOG_OBJECT (sink, "buffer %p dropped (redraw pending)", buffer);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* make sure that the application has called set_render_rectangle() */
|
||||
if (G_UNLIKELY (sink->window->render_rectangle.w == 0))
|
||||
|
|
Loading…
Reference in a new issue