mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
wlwindow: free staged buffer when do gst_wl_window_finalize
If waylandsink received buffer rate is high which causes frame drop, the cached staged buffer will be replaced when next buffer needs to be rendered and be freed after redraw. But there is chance to get memory leak if ended without redraw. So need to free staged buffer when do gst_wl_window_finalize(). Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6670>
This commit is contained in:
parent
4ac46ce82b
commit
be7ba5ac51
1 changed files with 3 additions and 0 deletions
|
@ -196,6 +196,9 @@ gst_wl_window_finalize (GObject * gobject)
|
|||
gst_wl_display_callback_destroy (priv->display, &priv->frame_callback);
|
||||
gst_wl_display_callback_destroy (priv->display, &priv->commit_callback);
|
||||
|
||||
if (priv->staged_buffer)
|
||||
gst_wl_buffer_unref_buffer (priv->staged_buffer);
|
||||
|
||||
g_cond_clear (&priv->configure_cond);
|
||||
g_mutex_clear (&priv->configure_mutex);
|
||||
g_mutex_clear (&priv->window_lock);
|
||||
|
|
Loading…
Reference in a new issue