-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent negative renderer timestamps when seeking back.
We are currently queuing periods in a way such that the new start position lines up with the end of the previous period (to ensure continuous playback). However, if the start position of the new period is larger than the total of all previously played period durations, we may end up with negative renderer timestamps when seeking back to the beginning of this new period. Negative timestamps should be avoided as most decoders have problems handling them correctly. This change forces a renderer reset if we detect such a seek to a negative renderer time and also resets the renderer offset to 0 every time all renderers are disabled, as this is the only time where we can savely change the offset of an existing media period. Also, if playback starts with an ad, we choose the content position as renderer offset to prevent the whole issue from occurring for the seek-behind- midroll case. Issue:#6009 Issue:#5323 PiperOrigin-RevId: 253790054
- Loading branch information
Showing
4 changed files
with
24 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters