Workaround for camera enumeration (MR 9)
The setup_camera() function removes found media devices from the device list on run but somehow avoids this on the pinephone due more bugs in the software. This makes it run with a clean list for every camera to fix this. The proper fix is dropping the whole setup_camera() procedure in the future.
This commit is contained in:
@@ -277,18 +277,16 @@ setup_camera(MPDeviceList **device_list, const struct mp_camera_config *config)
|
|||||||
static void
|
static void
|
||||||
setup(MPPipeline *pipeline, const void *data)
|
setup(MPPipeline *pipeline, const void *data)
|
||||||
{
|
{
|
||||||
MPDeviceList *device_list = mp_device_list_new();
|
|
||||||
|
|
||||||
for (size_t i = 0; i < MP_MAX_CAMERAS; ++i) {
|
for (size_t i = 0; i < MP_MAX_CAMERAS; ++i) {
|
||||||
const struct mp_camera_config *config = mp_get_camera_config(i);
|
const struct mp_camera_config *config = mp_get_camera_config(i);
|
||||||
if (!config) {
|
if (!config) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MPDeviceList *device_list = mp_device_list_new();
|
||||||
setup_camera(&device_list, config);
|
setup_camera(&device_list, config);
|
||||||
|
mp_device_list_free(device_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
mp_device_list_free(device_list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Reference in New Issue
Block a user