mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 01:31:03 +00:00
aja: Fix infinite loop in device provider
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7928>
This commit is contained in:
parent
dff223fdb4
commit
8a88cd541d
1 changed files with 4 additions and 1 deletions
|
@ -42,13 +42,16 @@ static GList *gst_aja_device_provider_probe(GstDeviceProvider *provider) {
|
||||||
while (CNTV2DeviceScanner::GetDeviceAtIndex(device_idx, device)) {
|
while (CNTV2DeviceScanner::GetDeviceAtIndex(device_idx, device)) {
|
||||||
auto features = device.features();
|
auto features = device.features();
|
||||||
// Skip non-input / non-output devices
|
// Skip non-input / non-output devices
|
||||||
if (features.GetNumVideoInputs() == 0 && features.GetNumVideoOutputs() == 0)
|
if (features.GetNumVideoInputs() == 0 && features.GetNumVideoOutputs() == 0) {
|
||||||
|
device_idx += 1;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (features.GetNumVideoInputs() > 0)
|
if (features.GetNumVideoInputs() > 0)
|
||||||
ret = g_list_prepend(ret, gst_aja_device_new(device, device_idx, TRUE));
|
ret = g_list_prepend(ret, gst_aja_device_new(device, device_idx, TRUE));
|
||||||
if (features.GetNumVideoOutputs() > 0)
|
if (features.GetNumVideoOutputs() > 0)
|
||||||
ret = g_list_prepend(ret, gst_aja_device_new(device, device_idx, FALSE));
|
ret = g_list_prepend(ret, gst_aja_device_new(device, device_idx, FALSE));
|
||||||
|
device_idx += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = g_list_reverse(ret);
|
ret = g_list_reverse(ret);
|
||||||
|
|
Loading…
Reference in a new issue