-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix sidx duration #4849
fix sidx duration #4849
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
src/loader/playlist-loader.ts
Outdated
const moovBox = findBox(data, ['moov'])[0]; | ||
const moovEndOffset = moovBox ? moovBox.length : null; // we need this in case we need to chop of garbage of the end of current data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can these moovBox
, moovEndOffset
lines be moved into the if (frag.initSegment) {
block below since they are not used otherwise?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Ive also deleted the comment because i think its obvious what are we trying to do now.
This PR will...
Fix calculation of the duration of a segment which contains multiple sidx atoms (multiple fragments in a single m4s file).
Why is this Pull Request needed?
Calculation of the duration based on sidx has a bug.
Are there any points in the code the reviewer needs to double check?
parseSegmentIndex
is refactored to be more cohesive and only parse sidx data.moovEndOffset
field has been removed fromSidxInfo
.Calculation of the moov offset has been moved to
handleSidxRequest
.Resolves issues:
Checklist