mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
ext/pulse/pulsesink.c: Don't wait for the pulse mainloop when destroying the stream.
Original commit message from CVS: * ext/pulse/pulsesink.c: (gst_pulsesink_destroy_stream): Don't wait for the pulse mainloop when destroying the stream. Fixes a deadlock when the pulsedaemon goes away while pulsesink is PLAYING. Fixes bug #556986.
This commit is contained in:
parent
d576b9fdbe
commit
67cc69ad52
2 changed files with 11 additions and 7 deletions
|
@ -1,3 +1,10 @@
|
|||
2009-01-05 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||
|
||||
* ext/pulse/pulsesink.c: (gst_pulsesink_destroy_stream):
|
||||
Don't wait for the pulse mainloop when destroying the stream.
|
||||
Fixes a deadlock when the pulsedaemon goes away while pulsesink
|
||||
is PLAYING. Fixes bug #556986.
|
||||
|
||||
2009-01-05 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||
|
||||
Patch by: Sascha Hauer <s dot hauer at pengutronix dot de>
|
||||
|
|
|
@ -279,7 +279,6 @@ gst_pulsesink_destroy_stream (GstPulseSink * pulsesink)
|
|||
{
|
||||
if (pulsesink->stream) {
|
||||
pa_stream_disconnect (pulsesink->stream);
|
||||
pa_threaded_mainloop_wait (pulsesink->mainloop);
|
||||
pa_stream_unref (pulsesink->stream);
|
||||
pulsesink->stream = NULL;
|
||||
}
|
||||
|
@ -588,16 +587,14 @@ gst_pulsesink_prepare (GstAudioSink * asink, GstRingBufferSpec * spec)
|
|||
if (!pulsesink->context
|
||||
|| pa_context_get_state (pulsesink->context) != PA_CONTEXT_READY) {
|
||||
GST_ELEMENT_ERROR (pulsesink, RESOURCE, FAILED, ("Bad context state: %s",
|
||||
pulsesink->
|
||||
context ? pa_strerror (pa_context_errno (pulsesink->context)) :
|
||||
NULL), (NULL));
|
||||
pulsesink->context ? pa_strerror (pa_context_errno (pulsesink->
|
||||
context)) : NULL), (NULL));
|
||||
goto unlock_and_fail;
|
||||
}
|
||||
|
||||
if (!(pulsesink->stream = pa_stream_new (pulsesink->context,
|
||||
pulsesink->
|
||||
stream_name ? pulsesink->stream_name : "Playback Stream",
|
||||
&pulsesink->sample_spec,
|
||||
pulsesink->stream_name ? pulsesink->
|
||||
stream_name : "Playback Stream", &pulsesink->sample_spec,
|
||||
gst_pulse_gst_to_channel_map (&channel_map, spec)))) {
|
||||
GST_ELEMENT_ERROR (pulsesink, RESOURCE, FAILED,
|
||||
("Failed to create stream: %s",
|
||||
|
|
Loading…
Reference in a new issue