Commit d920233a authored by Wim Taymans's avatar Wim Taymans
Browse files

gst-libs/gst/audio/gstaudiosink.c: Only actually wait for the thread to be stopped if it's running.

Original commit message from CVS:
* gst-libs/gst/audio/gstaudiosink.c: (gst_audioringbuffer_stop):
Only actually wait for the thread to be stopped if it's
running.
parent bd80afd2
2005-10-08 Wim Taymans <wim@fluendo.com>
* gst-libs/gst/audio/gstaudiosink.c: (gst_audioringbuffer_stop):
Only actually wait for the thread to be stopped if it's
running.
2005-10-08 Wim Taymans <wim@fluendo.com>
 
* gst-libs/gst/audio/gstbaseaudiosink.c:
......
......@@ -381,9 +381,11 @@ gst_audioringbuffer_stop (GstRingBuffer * buf)
{
GstAudioSink *sink;
GstAudioSinkClass *csink;
GstAudioRingBuffer *abuf;
sink = GST_AUDIO_SINK (GST_OBJECT_PARENT (buf));
csink = GST_AUDIO_SINK_GET_CLASS (sink);
abuf = GST_AUDIORING_BUFFER (buf);
/* unblock any pending writes to the audio device */
if (csink->reset) {
......@@ -392,9 +394,11 @@ gst_audioringbuffer_stop (GstRingBuffer * buf)
GST_DEBUG ("reset done");
}
GST_DEBUG ("stop, waiting...");
GST_AUDIORING_BUFFER_WAIT (buf);
GST_DEBUG ("stopped");
if (abuf->running) {
GST_DEBUG ("stop, waiting...");
GST_AUDIORING_BUFFER_WAIT (buf);
GST_DEBUG ("stopped");
}
return TRUE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment