Commit f9dc591a authored by Committed by François Cartegnie
Fix demuxing of non-fastseekable MP4 files over 2 GB.
An uint64_t is implicity cast to an int and then checked for >= 0; ostensibly to see if stream_Tell() failed, but once the file passes 2 GB, wraparound kicks in and the check fails. Somehow this worked fine for local files, but not for non-fastseekable ones (e.g. from HTTP). Fixes #16800. Quoting myself from the bug: Seemingly this code was introduced in ba3a2185 (May 2015), before stream_Tell() was made to never be able to fail and thus return unsigned (in 48786ae5, Aug 2015). It seems it deliberately wanted the variable to be signed (it even casts it back to uint64_t on the next line), but missed that it ought to be 64 bits. dfd028fe (Oct 2015) removed the helper function MP4_stream_Tell(), but I suppose that since this instance called stream_Tell() directly without going through the helper, it was missed. Signed-off-by: Francois Cartegnie <email@example.com>
Showing with 1 addition and 2 deletions