v4l2_stateful_decoder: Better h.264 bitstream detection

MPEG bitstreams can have many different NALUs. For the
purpose of decoding video on a few are needed. This CL
changes the detection logic to inspect the first |n|
NALUs to find the first one that is needed for decoding, SPS.

BUG=none
TEST=tast run ${trogdor_dut} video.PlatformDecoding.v4l2_h*

Change-Id: Ifc513d2b2dab4ba8e64d36b31473f1e0fb55fb21
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/drm-tests/+/4237338
Commit-Queue: Fritz Koenig <frkoenig@chromium.org>
Tested-by: Fritz Koenig <frkoenig@chromium.org>
Reviewed-by: Nathan Hebert <nhebert@chromium.org>
3 files changed