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

Handle invalid signed "tfdt" decode time values #5333

Merged
merged 3 commits into from
Mar 24, 2023

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Mar 24, 2023

This PR will...

Live to VOD streams from some vendors contain invalid CMAF tfdt (track fragment decode time). We suspect they tried writing a negative value to what is defines as an unsigned 64-bit integer. Assume that is the case when a value above 63-bit is found, and ignore it. Continuing to parse the remaining tfdt atoms if present, or returning null should ensure that the player uses a valid value or fallback to playlist time/passthrough, and prevents the invalid media timecode from shifting the playlist it is found in.

Why is this Pull Request needed?

If the first fmp4 segment loaded for a playlist has an invalid tfdt base media time the initPTS is assigned a bad value and the playlist is shifted. This can cause CMAF audio and video to be completely de-synced (the segments in the playlist affected can no longer be found).

Resolves issues:

Resolves #5303

@robwalch robwalch added this to the 1.4.0 milestone Mar 24, 2023
@robwalch robwalch force-pushed the bugfix/wrapped-track-fragment-decode-time branch from 0142925 to 5135cf9 Compare March 24, 2023 02:10
@robwalch robwalch force-pushed the bugfix/wrapped-track-fragment-decode-time branch from 8eaf3a8 to 2726f52 Compare March 24, 2023 16:53
@robwalch robwalch force-pushed the bugfix/wrapped-track-fragment-decode-time branch from 0fece0a to 6c493ea Compare March 24, 2023 18:20
@robwalch robwalch merged commit 1cd6912 into master Mar 24, 2023
@robwalch robwalch deleted the bugfix/wrapped-track-fragment-decode-time branch March 24, 2023 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Playback stalls with Cloudflare Stream output.
1 participant