mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-21 13:36:39 +00:00
playsink: Reset {mute,volume}-changed flags after setting the volume
These flags are there to make sure that the volume is set, if there is no volume element yet.
This commit is contained in:
parent
598c937634
commit
e72c3029c0
1 changed files with 3 additions and 0 deletions
|
@ -1538,6 +1538,7 @@ gen_audio_chain (GstPlaySink * playsink, gboolean raw, gboolean queue)
|
|||
/* use the sink to control the volume and mute */
|
||||
if (playsink->volume_changed) {
|
||||
g_object_set (G_OBJECT (chain->volume), "volume", playsink->volume, NULL);
|
||||
playsink->volume_changed = FALSE;
|
||||
}
|
||||
if (playsink->mute_changed) {
|
||||
if (chain->mute) {
|
||||
|
@ -1546,6 +1547,7 @@ gen_audio_chain (GstPlaySink * playsink, gboolean raw, gboolean queue)
|
|||
if (playsink->mute)
|
||||
g_object_set (chain->volume, "volume", (gdouble) 0.0, NULL);
|
||||
}
|
||||
playsink->mute_changed = FALSE;
|
||||
}
|
||||
} else {
|
||||
/* no volume, we need to add a volume element when we can */
|
||||
|
@ -1718,6 +1720,7 @@ setup_audio_chain (GstPlaySink * playsink, gboolean raw, gboolean queue)
|
|||
playsink->volume);
|
||||
/* use the sink to control the volume */
|
||||
g_object_set (G_OBJECT (chain->volume), "volume", playsink->volume, NULL);
|
||||
playsink->volume_changed = FALSE;
|
||||
}
|
||||
|
||||
g_signal_connect (chain->volume, "notify::volume",
|
||||
|
|
Loading…
Reference in a new issue