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.
This commit is contained in:
Wim Taymans 2005-10-08 12:02:08 +00:00
parent bd80afd2d1
commit d920233a73
2 changed files with 13 additions and 3 deletions

View file

@ -1,3 +1,9 @@
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:

View file

@ -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;
}