Fix Windows decoder stack overflow and allow manifest dir override
Running openh264rs integration tests inside Chromium's media_unittests
exceeded the 1 MB default thread stack on Windows during decoder
initialization, and could not locate test data inside Android APKs.
- Heap-allocate large fixed-size tables in SWelsDecoderSpsPpsCTX and
SWelsDecoderContext via Box<[T; N]> built from Vec so
SWelsDecoderContext::new_boxed avoids large stack temporaries while
keeping thin pointers and compile-time bounds-check elision.
- Drop redundant memset_zero constructors on SSps, SSubsetSps, and SPps
in favor of Default.
- Honor OPENH264_MANIFEST_DIR in common::manifest_dir() so external test
harnesses can supply the crate root path at runtime.
Bug: 581458350
Change-Id: I9194a63366bb52321c91f1ee39d32aad38013023
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/third_party/openh264rs/+/8732363
Reviewed-by: Frank Liberato <liberato@chromium.org>
Reviewed-by: Frank Liberato <liberato@google.com>
Reviewed-by: Eugene Zemtsov <ezemtsov@google.com>
4 files changed