ksvideosrc: Leak tracer reporting a memory leak when using GstDeviceMonitor
Issue
I am developing a small app which is using a GstDeviceMonitor to list available Audio/Source devices.
The leaks
GST_TRACER is reporting a leak.
Steps to reproduce
Available Plugins:
-
winks
plugin (e.g. forksvideosrc
plugin)
Environment variables:
GST_TRACERS="leaks(stack-traces-flags=full)" GST_DEBUG="GST_TRACER:7"
Reuced app:
int main(int argc, const char* argv[]) {
gst_init(&argc, const_cast<char***>(&argv));
GstDeviceMonitor *dev_mon = gst_device_monitor_new();
GstCaps* caps = gst_caps_new_empty_simple ("audio/x-raw");
gst_device_monitor_add_filter (dev_mon, "Audio/Source", caps);
gst_caps_unref (caps);
gst_device_monitor_start(dev_mon);
gst_device_monitor_stop(dev_mon);
g_object_unref(dev_mon);
gst_deinit();
return 0;
}
Running this program will report leaks for GstKsDevice. Removing gstwinks.dll from my GST_PLUGIN_PATH eliminates the associated leak.
Same conclusion with gstdirectshow.dll (leaking GstDshowDevice).
Setup
- Operating System: Windows11
- Device: Computer
- GStreamer Version: 1.21.1