playsink: Reset mute property of the sink to playsink's value when setting up the...
authorAndrei Sarakeev <sarakusha@gmail.com>
Tue, 25 Nov 2014 08:38:34 +0000 (11:38 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 25 Nov 2014 09:23:50 +0000 (10:23 +0100)
Otherwise the following can happen:
1. set mute=true
2. play media1 (Ok)
3. play media without audio (audiochain removed)
4. play media2 (audiochain created, mute=*false*)

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

gst/playback/gstplaysink.c

index 839cde118748b3bcb03525bd0482bc30c0dafe89..8239c8563390cdb98e54c098558b686e63676cda 100644 (file)
@@ -2995,6 +2995,8 @@ setup_audio_chain (GstPlaySink * playsink, gboolean raw)
       GST_DEBUG_OBJECT (playsink, "the sink has a mute property");
       chain->notify_mute_id = g_signal_connect (chain->mute, "notify::mute",
           G_CALLBACK (notify_mute_cb), playsink);
+      g_object_set (chain->mute, "mute", playsink->mute, NULL);
+      playsink->mute_changed = FALSE;
     }
 
     g_object_set (chain->conv, "use-volume", FALSE, NULL);