Maarten Lankhorst m.b.lankhorst@gmail.com writes:
- if (!S_ISCHR (st.st_mode)) {
ERR("%s: Not a device\n", device);
CoTaskMemFree(capBox);
return E_FAIL;
- }
Same here.
No, /dev/video* should never be an ordinary file, and see below.
There is absolutely no reason to check for that, it just hurts performance for no reason. Just open it and do the ioctl, if it's not a device it will fail, and you have to handle that case properly anyway.