[0.10] gst-plugins-good: pulsesink: start unmuted when requested

Wim Taymans wtay at kemper.freedesktop.org
Tue Apr 24 06:57:39 PDT 2012


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

Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date:   Tue Apr 24 15:34:57 2012 +0200

pulsesink: start unmuted when requested

When we explicitely set the mute property to FALSE, connect to pulseaudio with
the PA_STREAM_START_UNMUTED flag set, otherwise pulseaudio will use its
previously used value (which might start the stream muted).

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

---

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

diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c
index 11e9c89..2efb177 100644
--- a/ext/pulse/pulsesink.c
+++ b/ext/pulse/pulsesink.c
@@ -929,8 +929,12 @@ gst_pulseringbuffer_acquire (GstRingBuffer * buf, GstRingBufferSpec * spec)
   flags = PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_AUTO_TIMING_UPDATE |
       PA_STREAM_ADJUST_LATENCY | PA_STREAM_START_CORKED;
 
-  if (psink->mute_set && psink->mute)
-    flags |= PA_STREAM_START_MUTED;
+  if (psink->mute_set) {
+    if (psink->mute)
+      flags |= PA_STREAM_START_MUTED;
+    else
+      flags |= PA_STREAM_START_UNMUTED;
+  }
 
   /* we always start corked (see flags above) */
   pbuf->corked = TRUE;



More information about the gstreamer-commits mailing list