From 8a88cd541d3529ee8f38711a3e483574c44f52f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 20 Nov 2024 10:42:13 +0200 Subject: [PATCH] aja: Fix infinite loop in device provider Part-of: --- subprojects/gst-plugins-bad/sys/aja/gstajadeviceprovider.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-bad/sys/aja/gstajadeviceprovider.cpp b/subprojects/gst-plugins-bad/sys/aja/gstajadeviceprovider.cpp index ee95eebdef..58a31deb06 100644 --- a/subprojects/gst-plugins-bad/sys/aja/gstajadeviceprovider.cpp +++ b/subprojects/gst-plugins-bad/sys/aja/gstajadeviceprovider.cpp @@ -42,13 +42,16 @@ static GList *gst_aja_device_provider_probe(GstDeviceProvider *provider) { while (CNTV2DeviceScanner::GetDeviceAtIndex(device_idx, device)) { auto features = device.features(); // Skip non-input / non-output devices - if (features.GetNumVideoInputs() == 0 && features.GetNumVideoOutputs() == 0) + if (features.GetNumVideoInputs() == 0 && features.GetNumVideoOutputs() == 0) { + device_idx += 1; continue; + } if (features.GetNumVideoInputs() > 0) ret = g_list_prepend(ret, gst_aja_device_new(device, device_idx, TRUE)); if (features.GetNumVideoOutputs() > 0) ret = g_list_prepend(ret, gst_aja_device_new(device, device_idx, FALSE)); + device_idx += 1; } ret = g_list_reverse(ret);