mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
playsink: audio convert bin need not be unconditionally present
... so avoid NULL manipulation when setting up chain again (e.g. after having partially gone down to READY in native audio flag configuration).
This commit is contained in:
parent
5462536a36
commit
b2a162ca77
1 changed files with 3 additions and 4 deletions
|
@ -2297,8 +2297,10 @@ setup_audio_chain (GstPlaySink * playsink, gboolean raw)
|
||||||
GstElement *elem;
|
GstElement *elem;
|
||||||
GstPlayAudioChain *chain;
|
GstPlayAudioChain *chain;
|
||||||
GstStateChangeReturn ret;
|
GstStateChangeReturn ret;
|
||||||
|
GstPlaySinkAudioConvert *conv;
|
||||||
|
|
||||||
chain = playsink->audiochain;
|
chain = playsink->audiochain;
|
||||||
|
conv = GST_PLAY_SINK_AUDIO_CONVERT_CAST (chain->conv);
|
||||||
|
|
||||||
chain->chain.raw = raw;
|
chain->chain.raw = raw;
|
||||||
|
|
||||||
|
@ -2347,10 +2349,7 @@ setup_audio_chain (GstPlaySink * playsink, gboolean raw)
|
||||||
}
|
}
|
||||||
|
|
||||||
g_object_set (chain->conv, "use-volume", FALSE, NULL);
|
g_object_set (chain->conv, "use-volume", FALSE, NULL);
|
||||||
} else {
|
} else if (conv) {
|
||||||
GstPlaySinkAudioConvert *conv =
|
|
||||||
GST_PLAY_SINK_AUDIO_CONVERT_CAST (chain->conv);
|
|
||||||
|
|
||||||
/* no volume, we need to add a volume element when we can */
|
/* no volume, we need to add a volume element when we can */
|
||||||
g_object_set (chain->conv, "use-volume",
|
g_object_set (chain->conv, "use-volume",
|
||||||
! !(playsink->flags & GST_PLAY_FLAG_SOFT_VOLUME), NULL);
|
! !(playsink->flags & GST_PLAY_FLAG_SOFT_VOLUME), NULL);
|
||||||
|
|
Loading…
Reference in a new issue