Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/gstreamer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-01-14 21:55:05 +0300
committerTim-Philipp Müller <tim@centricular.com>2016-01-17 00:55:21 +0300
commit0263257783f02848b55b9eef2e5d46c4ee98b684 (patch)
treed88f353d96f78aa51244dc1af4626098ef773315
parent8e71f1c4d840ebbde29cdadec1dfcc0cd823f077 (diff)
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.
-rw-r--r--gst/gstdevicemonitor.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gst/gstdevicemonitor.c b/gst/gstdevicemonitor.c
index a9eda0ab91..4e6ecb326a 100644
--- a/gst/gstdevicemonitor.c
+++ b/gst/gstdevicemonitor.c
@@ -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);