mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-26 16:06:52 +00:00
wayland: leverage unified object destruction for wl_callback
This patch refactors gst_wl_display_callback_destroy() to use the recently introduced gst_wl_display_object_destroy() helper. Previously, the function manually handled wl_callback destruction with explicit lock/unlock calls and direct invocation of wl_callback_destroy(). Switching to gst_wl_display_object_destroy() unifies the destruction process across similar objects, reducing code duplication and potential errors. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8242>
This commit is contained in:
parent
6d17596777
commit
a99694cca8
1 changed files with 2 additions and 10 deletions
|
@ -590,16 +590,8 @@ void
|
|||
gst_wl_display_callback_destroy (GstWlDisplay * self,
|
||||
struct wl_callback **callback)
|
||||
{
|
||||
GstWlDisplayPrivate *priv = gst_wl_display_get_instance_private (self);
|
||||
|
||||
g_rec_mutex_lock (&priv->sync_mutex);
|
||||
|
||||
if (*callback) {
|
||||
wl_callback_destroy (*callback);
|
||||
*callback = NULL;
|
||||
}
|
||||
|
||||
g_rec_mutex_unlock (&priv->sync_mutex);
|
||||
gst_wl_display_object_destroy (self, (gpointer *) callback,
|
||||
(GDestroyNotify) wl_callback_destroy);
|
||||
}
|
||||
|
||||
struct wl_display *
|
||||
|
|
Loading…
Reference in a new issue