h264: Avoid Variable Length Arrays.
hevc: Add signed cast to avoid MSVC C4146 error.
hevc: Avoid Variable Length Arrays.