summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2017-11-21 23:10:03 -0500
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2017-11-25 14:59:03 -0500
commit51bb235cc6391bd8bd12ee5e3cea266bcd88bdc1 (patch)
treeb4ba0f4e1f5e2bba5ec7bb904490eccb5bfb62e3 /ext
parentb06a8bffde11aec2b67fbef436f1160eeb35c77e (diff)
downloadgstreamer-plugins-bad-51bb235cc6391bd8bd12ee5e3cea266bcd88bdc1.tar.gz
wlwindow: Only update video info on new render
The sink->video_info might not reflect the current buffer when expose is being called. https://bugzilla.gnome.org/show_bug.cgi?id=790057
Diffstat (limited to 'ext')
-rw-r--r--ext/wayland/gstwaylandsink.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c
index 6a8853306..199e45200 100644
--- a/ext/wayland/gstwaylandsink.c
+++ b/ext/wayland/gstwaylandsink.c
@@ -602,7 +602,7 @@ static const struct wl_callback_listener frame_callback_listener = {
/* must be called with the render lock */
static void
-render_last_buffer (GstWaylandSink * sink)
+render_last_buffer (GstWaylandSink * sink, gboolean redraw)
{
GstWlBuffer *wlbuffer;
const GstVideoInfo *info = NULL;
@@ -616,7 +616,7 @@ render_last_buffer (GstWaylandSink * sink)
callback = wl_surface_frame (surface);
wl_callback_add_listener (callback, &frame_callback_listener, sink);
- if (G_UNLIKELY (sink->video_info_changed)) {
+ if (G_UNLIKELY (sink->video_info_changed && !redraw)) {
info = &sink->video_info;
sink->video_info_changed = FALSE;
}
@@ -785,7 +785,7 @@ render:
}
gst_buffer_replace (&sink->last_buffer, to_render);
- render_last_buffer (sink);
+ render_last_buffer (sink, FALSE);
if (buffer != to_render)
gst_buffer_unref (to_render);
@@ -928,7 +928,7 @@ gst_wayland_sink_expose (GstVideoOverlay * overlay)
g_mutex_lock (&sink->render_lock);
if (sink->last_buffer && !sink->redraw_pending) {
GST_DEBUG_OBJECT (sink, "redrawing last buffer");
- render_last_buffer (sink);
+ render_last_buffer (sink, TRUE);
}
g_mutex_unlock (&sink->render_lock);
}