-
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
Do not adjust initPTS without accurate playlist time offset #6922
Conversation
@robwalch |
👍
This has nothing to do with Chrome's decoder. If playlists become desynced because of insufficient bandwidth, you can expect segments to be loaded out of sequence. Debug logs would include information about hls.js behavior in that case. |
… merge logic Keep audio-stream-controller startPosition within playlist bounds
@kakao-wise-kim please give it another try with changes 5ca9822. The audio playlist was drifting ahead. Hopefully selection is less suspicious now. 🕺 💃 |
@robwalch |
That is unrelated to these changes. Please file a new issue. |
I think it’s problematic if the playback position moves forward and skips downloaded segments. However, since the current system waits for the download to complete before starting playback, it does not skip the switched segments. Therefore, I do not consider this issue a problem. If the system is modified to download starting from the earliest available index, it would be an improvement in terms of optimization. |
Fix buffer flushing when switching between audio-only from main and alt (variant and media playlists) Add additional test coverage
f6baef4
to
17a49cf
Compare
Improve audio-stream-switched logging
This PR will...
Why is this Pull Request needed?
Adjusting initPTS should only be performed for contiguous operations or on switch when expected timestamps differ enough from playlist times that the only way forward is to remap them (these are malformed HLS but we support them since #5235 and #5471).
In this case, when live playlist updates are unable to be delivered frequently enough to stay in sync, media timestamps are used to realign them, but this remapping of initPTS prevented that adding permanent misalignment.
Re-emitting AUDIO_TRACK_LOADED when cachedTrackLoadedData caused mergeDetails to be called on the audio playlist details a second time shifting it forward.
Are there any points in the code the reviewer needs to double check?
accurateTimeOffset
is false because the playlist time should not be trusted for segments from live playlists which are being loaded out of sequence. In this state, initPTS should not be readjusted.Resolves issues:
Resolves #6920
Checklist