The deviceproviders are added to the array sorted by their rank. Make
sure we keep this ordering when removing a provider.
We use _prepend to collect the devices, use g_list_reverse to get the
devices in the right order; sorted by rank and in the same order as
returned by the provider.
GstDeviceProvider *provider = g_ptr_array_index (self->priv->providers, i);
GstBus *bus;
- g_ptr_array_remove_index_fast (self->priv->providers, i);
+ g_ptr_array_remove_index (self->priv->providers, i);
bus = gst_device_provider_get_bus (provider);
g_signal_handlers_disconnect_by_func (bus, bus_sync_message, self);
GST_OBJECT_UNLOCK (monitor);
- return devices;
+ return g_list_reverse (devices);
}
/**