Fix camera index for UVC cameras

This commit is contained in:
Martijn Braam
2024-04-27 18:53:19 +02:00
parent 31699feee1
commit d1f3ce6071

View File

@@ -558,9 +558,8 @@ libmegapixels_load_uvc(libmegapixels_devconfig *config)
if (config->cameras == NULL) { if (config->cameras == NULL) {
return -1; return -1;
} }
config->cameras[config->count++] = camera;
camera->index = config->count; camera->index = config->count;
config->cameras[config->count++] = camera;
} }
} }