Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make video playback smoother at the beginning
Video renderers assume that the player position is advancing linearly while in the started state. MediaCodecVideoRenderer schedules frames for rendering in the future in the expectation that the player position is advancing. This assumption is not currently true when using a position from the AudioTrack: the player position can be fixed for (in the worst case) up to about 100 ms before it starts increasing. This leads to an effect where the first frame is rendered then a few other frames are rendered, then there's a pause before frames start being rendered smoothly. Work around this issue by checking whether the position has started advancing before scheduling frames to be rendered in the future. It might be preferable to make the audio renderer only become ready when its timestamp can start advancing, but this is likely to be complicated. Issue: #3841 ------------- Created by MOE: https:/google/moe MOE_MIGRATED_REVID=190937429
- Loading branch information