waylandsink: Update stale GstBuffer references in wayland buffer cache
authorDamian Hobson-Garcia <dhobsong@igel.co.jp>
Wed, 22 Jul 2020 07:32:37 +0000 (16:32 +0900)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 28 Jul 2020 11:35:53 +0000 (11:35 +0000)
commitdeefedd002a91dcb66351cee6f3f92b5f62bcac7
tree1960d15b163335ff7aee363fb5c1ce3852021013
parented14e0d5a64c74506d50bac35663f7479eeb9c7f
waylandsink: Update stale GstBuffer references in wayland buffer cache

"waylandsink: use GstMemory instead of GstBuffer for cache lookup"
changes the cache key to GstMemory, but the cached data still needs
a pointer to the GstBuffer to control the buffer lifecycle.
If the GstMemory used as the cache key moves from one GstBuffer to
another, the pointer in the cached data will be out-of-date.

Update the current GstBuffer pointer for each frame so that it always
represents the currently in use (from attach to release) GstBuffer
for each wl_buffer.

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