ext/alsa/gstalsasink.c: Take appropriate lock when calling alsa methods.
authorAlan Peevers <peeves@pacbell.net>
Mon, 11 Feb 2008 17:03:18 +0000 (17:03 +0000)
committerJulien Moutte <julien@moutte.net>
Mon, 11 Feb 2008 17:03:18 +0000 (17:03 +0000)
Original commit message from CVS:
2008-02-11  Julien Moutte  <julien@fluendo.com>

Patch by: Alan Peevers <peeves@pacbell.net>

* ext/alsa/gstalsasink.c: (gst_alsasink_delay): Take appropriate
lock when calling alsa methods.

ChangeLog
common
ext/alsa/gstalsasink.c

index 7600ec4..042d5f3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-02-11  Julien Moutte  <julien@fluendo.com>
+       
+       Patch by: Alan Peevers <peeves@pacbell.net>
+
+       * ext/alsa/gstalsasink.c: (gst_alsasink_delay): Take appropriate
+       lock when calling alsa methods.
+
 2008-02-11  Tim-Philipp Müller  <tim at centricular dot net>
 
        * gst/typefind/gsttypefindfunctions.c:
diff --git a/common b/common
index 961bb6b..05a617c 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 961bb6bd997d7c8da6058534e86b4a1361c0fcea
+Subproject commit 05a617c9043ddb78f8578195b18c166d7e1d4c2e
index ce6a152..aa21636 100644 (file)
@@ -849,7 +849,9 @@ gst_alsasink_delay (GstAudioSink * asink)
 
   alsa = GST_ALSA_SINK (asink);
 
+  GST_ALSA_SINK_LOCK (asink);
   res = snd_pcm_delay (alsa->handle, &delay);
+  GST_ALSA_SINK_UNLOCK (asink);
   if (G_UNLIKELY (res < 0)) {
     GST_DEBUG_OBJECT (alsa, "snd_pcm_delay returned %d", res);
     delay = 0;