Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/gstreamer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2022-10-14 17:12:45 +0300
committerTim-Philipp Müller <tim@centricular.com>2022-10-15 12:15:26 +0300
commitc9006504bbc60919103ffcae570335c0052669bc (patch)
treee9a30c7bb4a806aba43a7c39ed8cc1e78af9841e
parentcba7eb67d0b20bec1c767c3fbe9dabe1eb6ba4d8 (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.c5
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;