waylandsink: Fix double render check
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 16 Sep 2021 21:12:58 +0000 (17:12 -0400)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 17 Sep 2021 14:14:42 +0000 (14:14 +0000)
commitafa1c19b37882a165fc0327ac103851edb95f7ec
tree0c2ea7e0e0b1b7d1bc17884e39c0567baf68f37e
parentf51371d7b9b628b95e635d45d44345c7de2dd20f
waylandsink: Fix double render check

Our code does not support rendering twice the same wl_buffer in a row, so it
tries to skip that case, but for this it relied on the GstBuffer pointer,
while the cache actually works at the GstMemory level now. To avoid this
compare the GstWlBuffer instead.

This fixes crash when use in zero-copy with videorate element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2526>
ext/wayland/gstwaylandsink.c
ext/wayland/wlbuffer.c