After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 758848 - wayland: free the frame in frame_release_callback
wayland: free the frame in frame_release_callback
Status: RESOLVED FIXED
Product: gstreamer-vaapi
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gstreamer-vaapi maintainer(s)
gstreamer-vaapi maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-11-30 14:06 UTC by Michael Olbrich
Modified: 2016-01-19 11:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (2.68 KB, patch)
2015-11-30 14:06 UTC, Michael Olbrich
committed Details | Review

Description Michael Olbrich 2015-11-30 14:06:26 UTC
Created attachment 316517 [details] [review]
patch

This basically reverts 62c3888b76afc69f714a020957e8c5dd9d98f561 (wayland:
decouple wl_buffer from frame).

Otherwise the frame may be overwritten while it is still used by the
compositer:
The frame done callback (frame_done_callback()) is called, when the
compositor is done processing the frame and hands it to the hardware.
The buffer release callback (frame_release_callback()) is called when the
buffer memory is no longer used.
This can be quite some time later: E.g. if weston (with the DRM backend
puts the buffer on a hardware plane, then then buffer release callback is
called when the kernel is done with the buffer. This is usually when the
next frame is shown, so most likely after the frame done callback for the
next frame!

Since 70eff01d36a2870cbf06ffb91c2a941e8cb6b804 "wayland: sync() when
destroy()" the mentioned possible leak should no longer be a problem, so
reverting this change should cause no leaking buffers.
Comment 1 Víctor Manuel Jáquez Leal 2015-12-02 10:44:47 UTC
Thanks for the patch!

It looks good, but, as already Sree mentioned in bug 758907, right now the repository is frozen because of 0.7.0 release.

We'll merge it after it.