mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
playbin2: fix initial volume handling also when reusing the element
This is a follow-up to commit 452988, making it work correctly when the audio chain is reused.
This commit is contained in:
parent
07c237ad19
commit
61441ff183
1 changed files with 6 additions and 3 deletions
|
@ -1552,9 +1552,12 @@ setup_audio_chain (GstPlaySink * playsink, gboolean raw, gboolean queue)
|
||||||
if (elem) {
|
if (elem) {
|
||||||
chain->volume = elem;
|
chain->volume = elem;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (playsink, "the sink has a volume property");
|
if (playsink->volume_changed) {
|
||||||
|
GST_DEBUG_OBJECT (playsink, "the sink has a volume property, setting %f",
|
||||||
|
playsink->volume);
|
||||||
/* use the sink to control the volume */
|
/* use the sink to control the volume */
|
||||||
g_object_set (G_OBJECT (chain->volume), "volume", playsink->volume, NULL);
|
g_object_set (G_OBJECT (chain->volume), "volume", playsink->volume, NULL);
|
||||||
|
}
|
||||||
/* if the sink also has a mute property we can use this as well. We'll only
|
/* if the sink also has a mute property we can use this as well. We'll only
|
||||||
* use the mute property if there is a volume property. We can simulate the
|
* use the mute property if there is a volume property. We can simulate the
|
||||||
* mute with the volume otherwise. */
|
* mute with the volume otherwise. */
|
||||||
|
|
Loading…
Reference in a new issue