waylandsink: prevent frame callback being released twice
authorRandy Li (ayaka) <ayaka@soulik.info>
Tue, 15 Dec 2020 10:11:08 +0000 (18:11 +0800)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Tue, 15 Jun 2021 20:25:17 +0000 (16:25 -0400)
commit0d746d1022c7f83bc297584cb4d456cae4697cbf
tree447b04771018ab5110f2d81cd6ae2287b1714002
parent4ac9f919216e567642f9e91c42061c163b1fec02
waylandsink: prevent frame callback being released twice

For those using context from the application which
would be the embedded video case, if the frame callback
is entering at the same time as window is finalizing,
a wayland proxy object would be destroyed twice, leading
the refcout less than zero in the second time, it can
throw an abort() in wayland.

For those top window case, which as a directly connection
to the compositor, they can stop the message queue then
the frame callback won't happen at the same time as the
window is finalizing. It doesn't think it would bother
them about this.

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