diff options
author | Edward Hervey <edward@centricular.com> | 2022-10-14 17:12:45 +0300 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2022-10-15 12:15:26 +0300 |
commit | c9006504bbc60919103ffcae570335c0052669bc (patch) | |
tree | e9a30c7bb4a806aba43a7c39ed8cc1e78af9841e | |
parent | cba7eb67d0b20bec1c767c3fbe9dabe1eb6ba4d8 (diff) |
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/3191>
-rw-r--r-- | subprojects/gst-plugins-base/tools/gst-play.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/subprojects/gst-plugins-base/tools/gst-play.c b/subprojects/gst-plugins-base/tools/gst-play.c index 0898ac1336..9c824f76bc 100644 --- a/subprojects/gst-plugins-base/tools/gst-play.c +++ b/subprojects/gst-plugins-base/tools/gst-play.c @@ -604,8 +604,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; |