urisourcebin: Fix collection leak
authorEdward Hervey <edward@centricular.com>
Thu, 5 Dec 2024 08:21:04 +0000 (09:21 +0100)
committerBackport Bot <gitlab-backport-bot@gstreamer-foundation.org>
Thu, 5 Dec 2024 10:17:25 +0000 (10:17 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8081>

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

index d64c69099efe9625a9cdc3cdd76016fcb5f3722e..7e1b9910a06c0db803d2f2e580f5fe353917d04a 100644 (file)
@@ -3051,6 +3051,10 @@ handle_message (GstBin * bin, GstMessage * msg)
                   gst_message_new_stream_collection ((GstObject *) urisrc,
                   aggregated);
             }
+            if (aggregated) {
+              /* Remove ref obtained from aggregate_collection() */
+              gst_object_unref (aggregated);
+            }
             gst_object_unref (collection);
           }
         }