Blame SOURCES/fix-crashes-in-pulseaudio.patch

ad3fed
From fe2a549e5d6dd9352a6d14c1d0d45a5c263c5d06 Mon Sep 17 00:00:00 2001
ad3fed
From: Ondrej Holy <oholy@redhat.com>
ad3fed
Date: Thu, 11 Jun 2015 13:25:35 +0200
ad3fed
Subject: [PATCH] rdpsnd/pulse: Fix crashes in pulseaudio
ad3fed
ad3fed
Function pa_stream_trigger has to be called under lock to avoid
ad3fed
following crashes on asserts:
ad3fed
ad3fed
Assertion 'e->mainloop->n_enabled_defer_events > 0' failed at pulse/mainloop.c:257, function mainloop_defer_enable(). Aborting.
ad3fed
Assertion '!e->next' failed at pulsecore/queue.c:104, function pa_queue_pop(). Aborting.
ad3fed
Assertion 'q->front' failed at pulsecore/queue.c:81, function pa_queue_push(). Aborting.
ad3fed
---
ad3fed
 channels/rdpsnd/pulse/rdpsnd_pulse.c | 2 ++
ad3fed
 1 file changed, 2 insertions(+)
ad3fed
ad3fed
diff --git a/channels/rdpsnd/pulse/rdpsnd_pulse.c b/channels/rdpsnd/pulse/rdpsnd_pulse.c
ad3fed
index 1a331f0..0fcedef 100644
ad3fed
--- a/channels/rdpsnd/pulse/rdpsnd_pulse.c
ad3fed
+++ b/channels/rdpsnd/pulse/rdpsnd_pulse.c
ad3fed
@@ -452,7 +452,9 @@ static void rdpsnd_pulse_start(rdpsndDevicePlugin* device)
ad3fed
 	if (!pulse->stream)
ad3fed
 		return;
ad3fed
 
ad3fed
+	pa_threaded_mainloop_lock(pulse->mainloop);
ad3fed
 	pa_stream_trigger(pulse->stream, NULL, NULL);
ad3fed
+	pa_threaded_mainloop_unlock(pulse->mainloop);
ad3fed
 }
ad3fed
 
ad3fed
 int FreeRDPRdpsndDeviceEntry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
ad3fed
-- 
ad3fed
2.5.0
ad3fed