adaptivedemux2: Fix parent object leak

gst_object_get_parent() method is transfer-full, thus unref is needed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3396>
This commit is contained in:
Rafał Dzięgiel 2022-11-13 12:18:54 +01:00 committed by GStreamer Marge Bot
parent 7988144048
commit 9e74c728cb

View file

@ -652,7 +652,10 @@ gst_adaptive_demux_check_streams_aware (GstAdaptiveDemux * demux)
gboolean ret = FALSE; gboolean ret = FALSE;
GstObject *parent = gst_object_get_parent (GST_OBJECT (demux)); 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; return ret;
} }