clapper: Fix media items leak when parsing URI list

Unlike other array containers, GListStore append function
refs object internally, so unref afterwards is needed.
This commit is contained in:
Rafał Dzięgiel
2025-11-25 20:24:13 +01:00
parent 48d7f48212
commit 54efc98166

View File

@@ -260,8 +260,10 @@ _parse_uri_list (ClapperPlaylistDemux *self, GUri *uri, GstBuffer *buffer,
break;
}
if (G_LIKELY (item != NULL))
if (G_LIKELY (item != NULL)) {
g_list_store_append (playlist, (GObject *) item);
gst_object_unref (item);
}
/* Advance to the next line */
ptr = nl ? (nl + 1) : end;