gpac / mp4box.js

JavaScript version of GPAC's MP4Box tool
https://gpac.github.io/mp4box.js/
BSD 3-Clause "New" or "Revised" License
1.94k stars 326 forks source link

fix(ISOFile.prototype.seek): skip already ended tracks #297

Closed lideen closed 1 year ago

lideen commented 1 year ago

Fix issue with files that have some tracks that don't extend the whole duration of the video. ISOFile.prototype.seek would return the offset based on already ended tracks and thus cause unnecessary downloads/buffering. Tried to explain behaviour below:

Before:

Video track 1: ====================================
Audio track 1: ====================================
Audio track 2: ===========
                          ^                  ^
                  returned offset           seek

After:

Video track 1: ====================================
Audio track 1: ====================================
Audio track 2: ===========
                                             ^
                                   seek & returned offset
lideen commented 1 year ago

Would it be possible to create a new release that includes this change (and other changes as well)? @cconcolato Thank you