mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
libs: windows: wayland: fix leak if failure of sync
Sometimes gst_vaapi_window_wayland_sync returns FALSE when poll returns EBUSY during destruction. In this case, if GstVaapiWindow is using vpp, leak of vpp surface happens. This surface is not attached to anything at this moment, so we should release it manually. https://bugzilla.gnome.org/show_bug.cgi?id=781695
This commit is contained in:
parent
307148dfc8
commit
2d7c7630c9
1 changed files with 3 additions and 0 deletions
|
@ -480,6 +480,9 @@ gst_vaapi_window_wayland_render (GstVaapiWindow * window,
|
||||||
|
|
||||||
/* Wait for the previous frame to complete redraw */
|
/* Wait for the previous frame to complete redraw */
|
||||||
if (!gst_vaapi_window_wayland_sync (window)) {
|
if (!gst_vaapi_window_wayland_sync (window)) {
|
||||||
|
/* Release vpp surface if exists */
|
||||||
|
if (priv->need_vpp && window->has_vpp)
|
||||||
|
gst_vaapi_video_pool_put_object (window->surface_pool, surface);
|
||||||
wl_buffer_destroy (buffer);
|
wl_buffer_destroy (buffer);
|
||||||
return !priv->sync_failed;
|
return !priv->sync_failed;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue