Commit cd88623d authored by Elia Devito's avatar Elia Devito
Browse files

fix/workaround for #422847

parent b8e7aae8
......@@ -37,7 +37,13 @@ Device::Device(GstDevice *device, QObject* parent)
, m_device(device)
{
auto st = gst_device_get_properties(device);
m_udi = structureValue(st, "sysfs.path");
gboolean udev_probed;
if (gst_structure_get_boolean(st, "udev-probed", &udev_probed) && !udev_probed)
m_udi = structureValue(st, "device.path");
else
m_udi = structureValue(st, "sysfs.path");
m_path = structureValue(st, "device.path");
gst_structure_free(st);
}
......
......@@ -191,8 +191,9 @@ void DeviceManager::deviceAdded(GstDevice* device)
void DeviceManager::deviceRemoved(GstDevice* device)
{
auto st(gst_device_get_properties(device));
auto udi = structureValue(st, "sysfs.path");
auto removedDevice = new Device(device, this);
auto udi = removedDevice->udi();
delete removedDevice;
for(int i = 0, c = m_deviceList.size(); i<c; ++i) {
auto dev = m_deviceList.at(i);
......
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