anthwlock / untrunc

Restore a truncated mp4/mov. Improved version of ponchio/untrunc
GNU General Public License v2.0
2.08k stars 199 forks source link

'sowt' can be all zeros, so need to keep them. #60

Closed poppyer9 closed 4 years ago

poppyer9 commented 4 years ago

*) The track can be all zeros including signature, probably because the cam is set to video-only, but still record zeros in audio track.

*) Without this change, it will skip zeros then messing up the remaining avc1/sowt track matching.

*) rename |ShouldIgnoreZeros| to be |ShouldKeepZeros| to be more precise. Because when it returns true, the code actually keeps zeros and not skipping.

anthwlock commented 4 years ago

In theory this could result in some (rare) miss classification issues.. E.g. some data tracks also contain mostly zeros. But I think many of these cases are now covered by Mp4::track_order_ (505853d6a167dadaefc46b332da66fa7c2e912ec) or by other means.