Closed jleclanche closed 4 years ago
I still think not guarding against timescale being zero is a bad idea but thank you for fixing it and thanks again for the tool, you saved me :)
One could add an assert(timescale_ > 0)
at the end of HasHeaderAtom::readHeaderAtom
.
But I really doubt you will find this in any healthy file, which timescale_
is read from.
With a timescale of 0, you can't translate timestamps to frames.
I just tested it, and vlc player shows for a (with correct timescale) 20s video a duration of 5h 18min, and is unable to show anything but the first frame. mpv won't even start, just spits out error messages on the console.
Fixes #8