v4l2-compliance: only check function if an MC is present

The codec tests checked if the function of the device as reported
by the media controller is that of an de/encoder. But that test
was also done for codecs without a MC, and then it fails.

So only do this test if an MC was found.

Also test that stateless codecs always have a MC since it is
required for such codecs.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Tested-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com>
3 files changed