pulsesink: gst_pulsesink_get_mute: set result earlier.
authorPhilippe Normand <phil@base-art.net>
Thu, 18 Feb 2010 08:05:50 +0000 (09:05 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 22 Feb 2010 19:49:03 +0000 (20:49 +0100)
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

index b29a85250cb3aef3a043e0b84a4e7c4e6b3365c9..8d7f7ba68ed79ac595e4e0d33733ae08244f8878 100644 (file)
@@ -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);