mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
Handle crash on cleanup
It's possible that the last ref to a source-output is removed with the remove signal, in that case, remove the object from the client watched objects to avoid freeing it twice. Use installed gstreamer and fix library name
This commit is contained in:
parent
273a5d35dc
commit
f6bb35cb98
5 changed files with 31 additions and 33 deletions
|
|
@ -125,6 +125,14 @@ pv_client_set_property (GObject *_object,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
handle_remove_source_output (PvSourceOutput *output,
|
||||
gpointer user_data)
|
||||
{
|
||||
g_object_steal_data (G_OBJECT (user_data),
|
||||
pv_source_output_get_object_path (output));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
handle_create_source_output (PvClient1 *interface,
|
||||
GDBusMethodInvocation *invocation,
|
||||
|
|
@ -164,6 +172,11 @@ handle_create_source_output (PvClient1 *interface,
|
|||
|
||||
object_path = pv_source_output_get_object_path (output);
|
||||
|
||||
g_signal_connect (output,
|
||||
"remove",
|
||||
(GCallback) handle_remove_source_output,
|
||||
client);
|
||||
|
||||
g_object_set_data_full (G_OBJECT (client),
|
||||
object_path,
|
||||
output,
|
||||
|
|
@ -238,6 +251,11 @@ handle_create_source_input (PvClient1 *interface,
|
|||
|
||||
source_input_path = pv_source_output_get_object_path (input);
|
||||
|
||||
g_signal_connect (input,
|
||||
"remove",
|
||||
(GCallback) handle_remove_source_output,
|
||||
client);
|
||||
|
||||
g_object_set_data_full (G_OBJECT (client),
|
||||
source_input_path,
|
||||
input,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue