uridecodebin3: clear subitem if suburi is set to NULL

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1649

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3730>
This commit is contained in:
Tim-Philipp Müller 2023-01-14 16:16:49 +00:00 committed by GStreamer Marge Bot
parent 211191564e
commit 64c4bfdf7e

View 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));