Commit 4d6c7ccd authored by Nirbheek Chauhan's avatar Nirbheek Chauhan 🐜 Committed by Tim-Philipp Müller

GstDeviceMonitor: Don't remove unmatched class filters

If no providers for a particular class could be found, then removing unmatched
filters would cause all devices to be returned instead which is not at all what
the user intended. We still return 0 for unmatched filters.
parent f875bec5
...@@ -695,12 +695,9 @@ gst_device_monitor_add_filter (GstDeviceMonitor * monitor, ...@@ -695,12 +695,9 @@ gst_device_monitor_add_filter (GstDeviceMonitor * monitor,
/* Ensure there is no leak here */ /* Ensure there is no leak here */
g_assert (factories == NULL); g_assert (factories == NULL);
if (matched) { if (matched)
id = filter->id; id = filter->id;
g_ptr_array_add (monitor->priv->filters, filter); g_ptr_array_add (monitor->priv->filters, filter);
} else {
device_filter_free (filter);
}
GST_OBJECT_UNLOCK (monitor); GST_OBJECT_UNLOCK (monitor);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment