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.
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);