node-video-lib icon indicating copy to clipboard operation
node-video-lib copied to clipboard

Stuck in infinite while loop on a corrupt video file

Open petterbergman opened this issue 1 year ago • 0 comments

Running VideoLib.MovieParser.parse on a corrupt video file, the _findMoovAtom method in lib/mp4/parser-impl.js get stuck in an infinite while loop on line 51. The variable pos does not update. On line 65, it will call reader.read, but it will return false and thus pos has not advanced and the loop continues forever.

A simple else after line 69 with pos++ will fix it, but as I'm not familiar with the code, I'm not sure this is the right approach.

petterbergman avatar May 23 '24 10:05 petterbergman