summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatricia Muscalu <patricia@axis.com>2023-04-20 10:03:27 +0200
committerTim-Philipp Müller <tim@centricular.com>2023-04-20 16:40:22 +0100
commit917424b3fbc18d8455485cd9d8c1acd49280af37 (patch)
tree7a134cb5568a9796f7f99fcb7c69fd1f55fe959d
parent785427bab19365fb42757d62fd1d522292c95716 (diff)
downloadgstreamer-917424b3fbc18d8455485cd9d8c1acd49280af37.tar.gz
playsink: Fix volume leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4463>
-rw-r--r--subprojects/gst-plugins-base/gst/playback/gstplaysink.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/subprojects/gst-plugins-base/gst/playback/gstplaysink.c b/subprojects/gst-plugins-base/gst/playback/gstplaysink.c
index a5619e9464..b1701cd503 100644
--- a/subprojects/gst-plugins-base/gst/playback/gstplaysink.c
+++ b/subprojects/gst-plugins-base/gst/playback/gstplaysink.c
@@ -4998,9 +4998,8 @@ gst_play_sink_change_state (GstElement * element, GstStateChange transition)
/* fall through */
case GST_STATE_CHANGE_READY_TO_NULL:
GST_PLAY_SINK_LOCK (playsink);
- if (playsink->audiochain && playsink->audiochain->sink_volume) {
- /* remove our links to the volume elements when they were
- * provided by a sink */
+ if (playsink->audiochain) {
+ /* remove our links to the volume elements */
disconnect_audio_chain (playsink->audiochain, playsink);
if (playsink->audiochain->volume)
gst_object_unref (playsink->audiochain->volume);