onvif-media-factory: Fix pad ref leak

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8378>
This commit is contained in:
Jan Schmidt 2025-01-24 18:13:24 +11:00 committed by GStreamer Marge Bot
parent 37f1077284
commit 6921405f40

View File

@ -270,7 +270,9 @@ gst_rtsp_onvif_media_factory_create_element (GstRTSPMediaFactory * factory,
}
depay_ghostpad = gst_ghost_pad_new ("sink", depay_pad);
gst_element_add_pad (backchannel_bin, depay_ghostpad);
gst_object_unref (depay_pad);
gst_element_add_pad (backchannel_bin, depay_ghostpad); // Takes ownership of depay_ghostpad
gst_bin_add (GST_BIN (element), backchannel_bin);
}