kathenas / rpms / mutter

Forked from rpms/mutter 5 years ago
Clone

Blame SOURCES/0001-screen-cast-src-Destroy-hash-dmabuf-table-after-stre.patch

99364f
From b32ae04c122f4f76ffad296c15ba00a13800db57 Mon Sep 17 00:00:00 2001
99364f
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
99364f
Date: Tue, 2 Jun 2020 16:33:05 +0000
99364f
Subject: [PATCH 1/2] screen-cast-src: Destroy hash dmabuf table after stream
99364f
99364f
The stream will clean up the buffers, so let it do that before we
99364f
destroy them under its feet. Note that it'll only do this after the
99364f
following PipeWire commit:
99364f
99364f
    commit fbaa4ddedd84afdffca16f090dcc4b0db8ccfc29
99364f
    Author: Wim Taymans <wtaymans@redhat.com>
99364f
    Date:   Mon Jun 1 15:36:09 2020 +0200
99364f
99364f
        stream: allow NULL param and 0 buffers in disconnect
99364f
99364f
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1283
99364f
99364f
99364f
(cherry picked from commit 97175f8fa14171606ecb95d0bf107ef8b2d71b74)
99364f
---
99364f
 src/backends/meta-screen-cast-stream-src.c | 2 +-
99364f
 1 file changed, 1 insertion(+), 1 deletion(-)
99364f
99364f
diff --git a/src/backends/meta-screen-cast-stream-src.c b/src/backends/meta-screen-cast-stream-src.c
99364f
index 0500bfec5..ff4af440c 100644
99364f
--- a/src/backends/meta-screen-cast-stream-src.c
99364f
+++ b/src/backends/meta-screen-cast-stream-src.c
99364f
@@ -988,8 +988,8 @@ meta_screen_cast_stream_src_finalize (GObject *object)
99364f
   if (meta_screen_cast_stream_src_is_enabled (src))
99364f
     meta_screen_cast_stream_src_disable (src);
99364f
 
99364f
-  g_clear_pointer (&priv->dmabuf_handles, g_hash_table_destroy);
99364f
   g_clear_pointer (&priv->pipewire_stream, pw_stream_destroy);
99364f
+  g_clear_pointer (&priv->dmabuf_handles, g_hash_table_destroy);
99364f
   g_clear_pointer (&priv->pipewire_core, pw_core_disconnect);
99364f
   g_clear_pointer (&priv->pipewire_context, pw_context_destroy);
99364f
   g_source_destroy (&priv->pipewire_source->base);
99364f
-- 
99364f
2.26.2
99364f