Definition of tenc box seems invalid or too leniant
rlaphoenix opened this issue · 0 comments
rlaphoenix commented
I've attached a sample tenc
box from https://sho.com, specifically the show Yellowjackets S02E05 on the 2160p track.
It fails to parse with the following error:
Traceback (most recent call last):
File "C:\Program Files\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Program Files\Python310\Scripts\mp4dump.exe\__main__.py", line 7, in <module>
File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\pymp4\cli.py", line 26, in dump
box = Box.parse_stream(fd)
File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\construct\core.py", line 186, in parse_stream
return self._parse(stream, context, "parsing")
File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\pymp4\parser.py", line 46, in _parse
obj = self.subcon._parse(stream2, context, path)
File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\construct\core.py", line 855, in _parse
subobj = list(sc._parse(stream, context, path).items())
File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\construct\core.py", line 297, in _parse
return self.subcon._parse(stream, context, path)
File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\construct\core.py", line 1544, in _parse
obj = self.cases.get(key, self.default)._parse(stream, context, path)
File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\construct\core.py", line 859, in _parse
subobj = sc._parse(stream, context, path)
File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\construct\core.py", line 2700, in _parse
raise e.__class__("%s\n %s" % (e, path))
construct.core.ConstError: expected 0 but parsed 25
parsing -> _reserved1
It's failing at the byte 0xD with the value 0x19 (25 decimal). This offset would be the _reserved1
definition.