v4l2_stateful_decoder: Add VP8 and fix exit codes

This commit fixes error code returning for CAPTURE queue setup and
buffer queueing. This lets the binary return with non-zero exit code
instead of stalling when there is an error. In addition, some bugs were
fixed that could cause stalls or segmentation faults.

The commit adds a fourcc check for VP9 before doing VP9-specific
parsing. The binary previously misenterpreted a VP8 uncompressed header
which caused an issue where the OUTPUT_queue though there were more
frames than were present in the stream. Blocking the VP9-specific
parsing for VP8 files fixed VP8 decode support from IVF files.

BUG=b:191804616
TEST=v4l2_stateful_decoder -v 0 -d vp8_test_file.ivf

Change-Id: I81eb3d97feaee59e82cb7a9bf61a618c77c7e453
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/drm-tests/+/3046046
Tested-by: Nathan Hebert <nhebert@chromium.org>
Commit-Queue: Nathan Hebert <nhebert@chromium.org>
Reviewed-by: Fritz Koenig <frkoenig@chromium.org>
Reviewed-by: Steve Cho <stevecho@chromium.org>
1 file changed