[gst-cvs] gst-plugins-good: pulsesink: gst_pulsesink_get_mute: set result earlier.

Sebastian Dröge slomo at kemper.freedesktop.org
Mon Feb 22 11:49:31 PST 2010


Module: gst-plugins-good
Branch: master
Commit: 3ab666762fa6da97f66c8398d2ac6ec697da5708
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=3ab666762fa6da97f66c8398d2ac6ec697da5708

Author: Philippe Normand <phil at base-art.net>
Date:   Thu Feb 18 09:05:50 2010 +0100

pulsesink: gst_pulsesink_get_mute: set result earlier.

In the cases where no buffer was process yet or the index is not
available, get_pulsesink_get_mute() would unconditionally return
FALSE.

https://bugzilla.gnome.org/show_bug.cgi?id=610337

---

 ext/pulse/pulsesink.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c
index b29a852..8d7f7ba 100644
--- a/ext/pulse/pulsesink.c
+++ b/ext/pulse/pulsesink.c
@@ -1905,6 +1905,7 @@ gst_pulsesink_get_mute (GstPulseSink * psink)
   gboolean mute = FALSE;
 
   pa_threaded_mainloop_lock (psink->mainloop);
+  mute = psink->mute;
 
   pbuf = GST_PULSERING_BUFFER_CAST (GST_BASE_AUDIO_SINK (psink)->ringbuffer);
   if (pbuf == NULL || pbuf->stream == NULL)
@@ -1923,8 +1924,6 @@ gst_pulsesink_get_mute (GstPulseSink * psink)
       goto unlock;
   }
 
-  mute = psink->mute;
-
 unlock:
   if (o)
     pa_operation_unref (o);





More information about the Gstreamer-commits mailing list