From: Haihua Hu Date: Thu, 18 Oct 2018 05:35:04 +0000 (+0800) Subject: wayland/wlbuffer: just return if used_by_compositor is true when attach X-Git-Tag: 1.16.2~84 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=087f9cfded0071ff3959354e47741198949dc0d4;p=platform%2Fupstream%2Fgst-plugins-bad.git wayland/wlbuffer: just return if used_by_compositor is true when attach When buffer is used by compositor, we don't need attach it and hold one more reference. Just check used_by_compositor, just return if it is true. Assert error log is not need, this is normal behavior. --- diff --git a/ext/wayland/wlbuffer.c b/ext/wayland/wlbuffer.c index 4ac99ef4b..21214604f 100644 --- a/ext/wayland/wlbuffer.c +++ b/ext/wayland/wlbuffer.c @@ -220,7 +220,10 @@ gst_wl_buffer_force_release_and_unref (GstWlBuffer * self) void gst_wl_buffer_attach (GstWlBuffer * self, struct wl_surface *surface) { - g_return_if_fail (self->used_by_compositor == FALSE); + if (self->used_by_compositor) { + GST_DEBUG_OBJECT (self, "buffer used by compositor %p", self->gstbuffer); + return; + } wl_surface_attach (surface, self->wlbuffer, 0, 0);