Skip to content

Commit

Permalink
Return latest result (falls back to playlist time)
Browse files Browse the repository at this point in the history
  • Loading branch information
robwalch committed Mar 24, 2023
1 parent 5135cf9 commit 8eaf3a8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/utils/mp4-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,10 @@ export function getStartDTS(initData: InitData, fmp4: Uint8Array): number {
// This prevents large values from being used for initPTS, which can cause playlist sync issues.
// https://github.com/video-dev/hls.js/issues/5303
if (baseTime > Math.pow(2, 63)) {
const signedValue = baseTime - Math.pow(2, 64);
logger.warn(
`[mp4-demuxer]: Found large track fragment decode time of ${baseTime}, treating as signed 64-bit int ${signedValue}`
`[mp4-demuxer]: Found large track fragment decode time of ${baseTime}, using last result ${result} or playlist time instead.`
);
baseTime = signedValue;
return result;
}
}
// assume a 90kHz clock if no timescale was specified
Expand Down

0 comments on commit 8eaf3a8

Please sign in to comment.