mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-07 07:55:41 +00:00
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.
This commit is contained in:
parent
8e71f1c4d8
commit
0263257783
1 changed files with 2 additions and 5 deletions
|
@ -695,12 +695,9 @@ gst_device_monitor_add_filter (GstDeviceMonitor * monitor,
|
|||
/* Ensure there is no leak here */
|
||||
g_assert (factories == NULL);
|
||||
|
||||
if (matched) {
|
||||
if (matched)
|
||||
id = filter->id;
|
||||
g_ptr_array_add (monitor->priv->filters, filter);
|
||||
} else {
|
||||
device_filter_free (filter);
|
||||
}
|
||||
g_ptr_array_add (monitor->priv->filters, filter);
|
||||
|
||||
GST_OBJECT_UNLOCK (monitor);
|
||||
|
||||
|
|
Loading…
Reference in a new issue