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:
authorRafał Dzięgiel <rafostar.github@gmail.com>2022-11-13 14:18:54 +0300
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2022-11-13 14:35:09 +0300
commit9e74c728cb3b57772a3542536beb279ffa7cf228 (patch)
treef0277ae9162cd775d2761eda045c230be909dda4
parent7988144048f47dee4b5f0cf6ec4e5243a03e6499 (diff)
adaptivedemux2: Fix parent object leakmain
gst_object_get_parent() method is transfer-full, thus unref is needed Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3396>
-rw-r--r--subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux.c
index 622ebf225f..b465ac3743 100644
--- a/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux.c
+++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux.c
@@ -652,7 +652,10 @@ gst_adaptive_demux_check_streams_aware (GstAdaptiveDemux * demux)
gboolean ret = FALSE;
GstObject *parent = gst_object_get_parent (GST_OBJECT (demux));
- ret = (parent && GST_OBJECT_FLAG_IS_SET (parent, GST_BIN_FLAG_STREAMS_AWARE));
+ if (parent) {
+ ret = GST_OBJECT_FLAG_IS_SET (parent, GST_BIN_FLAG_STREAMS_AWARE);
+ gst_object_unref (parent);
+ }
return ret;
}