untrunc
untrunc copied to clipboard
Assertion failed: current_chunk_.n_samples_ in Track::pushBackLastChunk (LPCM track)
Describe the bug
untrunc crashes with an assertion failure while reading the mdat atom of the truncated file. The error points to Track::pushBackLastChunk where current_chunk_.n_samples_ fails the assertion (likely equals 0).
The reference file contains an lpcm (Linear PCM) track which triggers a fallback to dynamic stats.
To Reproduce
Run untrunc using a reference file that contains lpcm audio tracks against a truncated MOV.
Command
untrunc.exe Capture0010.mov Capture0003.mov
Log Output
Info: version 'v367-13cafed' using ffmpeg '3.3.4' Lavc57.89.100
Info: reading Capture0010.mov
Info: parsing healthy moov atom ...
Info: unknown track 'lpcm' found -> fallback to dynamic stats
Info: using dynamic stats, use '-is' to see them
Info: reading mdat from truncated file ...
Info: using 64-bit offsets for the broken file
src/track.cpp:816: void Track::pushBackLastChunk(): Assertion `current_chunk_.n_samples_' failed.
Reference: https://drive.google.com/file/d/1gg9O5TP3AiYR6xoNNkSD9FEhj61nH2Uc/view Corrupted: https://drive.google.com/file/d/1YfriBZfSUFMAdSf9gLkldLN_CkwYytst/view