uridecodebin3: clear subitem if suburi is set to NULL
authorTim-Philipp Müller <tim@centricular.com>
Sat, 14 Jan 2023 16:16:49 +0000 (16:16 +0000)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 18 Jan 2023 11:43:31 +0000 (11:43 +0000)
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1649

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

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

index b9bfab1..3e8e599 100644 (file)
@@ -1728,8 +1728,13 @@ play_item_set_uri (GstPlayItem * item, const gchar * uri)
 static void
 play_item_set_suburi (GstPlayItem * item, const gchar * uri)
 {
-  if (!uri)
+  if (!uri) {
+    if (item->sub_item) {
+      free_source_item (item->uridecodebin, item->sub_item);
+      item->sub_item = NULL;
+    }
     return;
+  }
 
   if (!item->sub_item) {
     item->sub_item = new_source_item (item->uridecodebin, item, g_strdup (uri));