Description
Describe the bug
video_closest_frmival()
is expecting the driver to increment fie.index
. This is not the correct API and having this in video_common.c
and video_emul_imager.c
is misleading. The tests is also wrong.
To Reproduce
The CI passes while it should fail as the test is testing the wrong thing:
zephyr/tests/drivers/video/api/src/video_emul.c
Lines 84 to 86 in 493be79
Expected behavior
The driver does not increment fie.index
, the caller does.
Impact
No public code currently uses it, but developers building new code will be confused.
Logs and console output
Environment (please complete the following information):
CI
Additional context
A PR to fix it is already proposed here:
But only one commit out of it is for the actual fix and can be split: