Skip to content
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: Fix timestamp offset for ID3 on DAI-HLS #4696

Merged
merged 3 commits into from
Nov 14, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/media/media_source_engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -586,11 +586,11 @@ shaka.media.MediaSourceEngine = class {
mimeType = this.transmuxers_[contentType].getOrginalMimeType();
}
if (shaka.util.TsParser.probe(uint8ArrayData)) {
const metadata = new shaka.util.TsParser().parse(uint8ArrayData)
.getMetadata();
const tsParser = new shaka.util.TsParser().parse(uint8ArrayData);
const timestampOffset =
reference.startTime - (tsParser.getStartTime()[contentType] || 0);
joeyparrish marked this conversation as resolved.
Show resolved Hide resolved
const metadata = tsParser.getMetadata();
if (metadata.length) {
const timestampOffset =
this.sourceBuffers_[contentType].timestampOffset;
this.onMetadata_(metadata, timestampOffset,
reference ? reference.endTime : null);
}
Expand Down