uridecodebin3: fix stream leak
authorGuillaume Desmottes <guillaume.desmottes@onestream.live>
Wed, 21 Dec 2022 14:35:21 +0000 (15:35 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 11 Jan 2023 16:44:21 +0000 (16:44 +0000)
GstSourcePad owns the GstStream but was not unreffing it when being
disposed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3617>

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

index ed317c9..724ea7e 100644 (file)
@@ -1391,6 +1391,9 @@ src_pad_removed_cb (GstElement * element, GstPad * pad,
     gst_element_release_request_pad (uridecodebin->decodebin,
         spad->db3_sink_pad);
 
+  if (spad->stream)
+    gst_object_unref (spad->stream);
+
   handler->sourcepads = g_list_remove (handler->sourcepads, spad);
   g_slice_free (GstSourcePad, spad);
 }