>> +int avdevice_list_devices(AVFormatContext *s, AVDeviceInfoList **device_list) > > This part and the related changes could go in a separate patch. It could > probably be applied much faster. Good idea, I've sent extracted hunks in separate thread, I will return to the rest of this one later.