device-monitor: list hidden providers before listing devices

The way it was implemented could make the list updated after the
list of device was filled with supposdely hidden devices
This commit is contained in:
Thibault Saunier 2019-04-30 17:24:50 -04:00 committed by Tim-Philipp Müller
parent 63f0b31dbf
commit cdf7d802db

View file

@ -379,6 +379,13 @@ again:
devices = NULL;
hidden = NULL;
for (i = 0; i < monitor->priv->providers->len; i++) {
GstDeviceProvider *provider =
g_ptr_array_index (monitor->priv->providers, i);
update_hidden_providers_list (&hidden, provider);
}
cookie = monitor->priv->cookie;
for (i = 0; i < monitor->priv->providers->len; i++) {
@ -393,7 +400,6 @@ again:
tmpdev = gst_device_provider_get_devices (provider);
GST_OBJECT_LOCK (monitor);
update_hidden_providers_list (&hidden, provider);
} else {
tmpdev = NULL;
}