diff options
author | Benjamin Gaignard <benjamin.gaignard@linaro.org> | 2014-10-07 10:37:33 +0200 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2014-10-11 17:35:41 +0200 |
commit | 23bb5f53196773139e138a67a4ed2ee2dedc9aa9 (patch) | |
tree | 4620e8105aa163e7afcd76617d06a870046fbb96 /ext/wayland | |
parent | 4395c02b9634b353d57a630db69b188394bb148b (diff) | |
download | gstreamer-plugins-bad-23bb5f53196773139e138a67a4ed2ee2dedc9aa9.tar.gz |
waylandsink: do not render twice the same buffer
Do not try to render a buffer that is already being rendered.
This happens typically during the initial rendering stage as the first
buffer is rendered twice: first by preroll(), then by render().
This commit avoids this assertion failure:
CRITICAL: gst_wayland_compositor_acquire_buffer: assertion
'meta->used_by_compositor == FALSE' failed
https://bugzilla.gnome.org/show_bug.cgi?id=738069
Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Diffstat (limited to 'ext/wayland')
-rw-r--r-- | ext/wayland/gstwaylandsink.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c index 363b31bc4..d666a201c 100644 --- a/ext/wayland/gstwaylandsink.c +++ b/ext/wayland/gstwaylandsink.c @@ -667,6 +667,12 @@ gst_wayland_sink_render (GstBaseSink * bsink, GstBuffer * buffer) } } + /* drop double rendering */ + if (G_UNLIKELY (to_render == sink->last_buffer)) { + GST_LOG_OBJECT (sink, "Buffer already being rendered"); + goto done; + } + gst_buffer_replace (&sink->last_buffer, to_render); render_last_buffer (sink); |