ISM metadata file reader does not report errors in invalid files
Basic info
- Commit SHA: 39f866d0
- Platform: MacOS
Bug description
ISM file reader does not report errors when reading files with invalid metadata format. This is especially inconvenient since the metadata format was changed in !212 (merged). When fed ISM metadata files in the old format, the encoder crashes due to an assert at encoding stage and displays an error message that is unrelated to the real cause of the failure.
NOTE: this also may mean that values at encoder API are not validated to lie within a sensible range
Ways to reproduce
Run encoder with an old ISM metadata file test_ISM_trajectory1.csv:
IVAS_cod -ism 1 test_ISM_trajectory1.csv 48000 48 any_mono_file.wav out.g192
Printed output (may depend on platform/compiler, since uninitialized memory is involved):
Internal fatal error: Indice ID = 12 with value 129 exceeds the range of 7 bits (frame 192) !
In function: push_indice(), /Users/sgi/src/ivas/lib_com/bitstream.c:250