playsink: Fix volume leak
authorPatricia Muscalu <patricia@axis.com>
Thu, 20 Apr 2023 08:03:27 +0000 (10:03 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 20 Apr 2023 15:40:22 +0000 (16:40 +0100)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4463>

subprojects/gst-plugins-base/gst/playback/gstplaysink.c

index a5619e9..b1701cd 100644 (file)
@@ -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);