mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-08 16:35:40 +00:00
gst-play: Don't leak the stream collection
We are given a reference to the collection when parsing it from the message. Just store it (instead of referencing it again). Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3186>
This commit is contained in:
parent
b10e0efd3a
commit
ece84d69a2
1 changed files with 3 additions and 2 deletions
|
@ -620,8 +620,9 @@ play_bus_msg (GstBus * bus, GstMessage * msg, gpointer user_data)
|
|||
|
||||
if (collection) {
|
||||
g_mutex_lock (&play->selection_lock);
|
||||
gst_object_replace ((GstObject **) & play->collection,
|
||||
(GstObject *) collection);
|
||||
if (play->collection)
|
||||
gst_object_unref (play->collection);
|
||||
play->collection = collection;
|
||||
g_mutex_unlock (&play->selection_lock);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue