Add unit tests for opus_packet_extensions_count, opus_packet_extensions_parse,
and opus_packet_extensions_generate. Add various assertions for NULL buffers or
negative length arguments. Add explicit check for invalid length in
opus_packet_extensions_count. Check for extension id >127 in
opus_packet_extensions_generate. Check for invalid length input in
opus_packet_extensions_generate.
Signed-off-by: Jean-Marc Valin <jmvalin@amazon.com>
|frame_size_enum| in tests/test_opus_encode.cl:117 is flagged as potentially
uninitialized but get_frame_size_enum() will fail anyway if a valid value is
not found.
Newer versions of MSVC are unhappy with the strategy of the build
environment redefining "inline" (even though they don't support the
actual keyword). Instead we define OPUS_INLINE to the right thing
in opus_defines.h.
This is the same approach we use for restrict.