mirror of
https://github.com/androidx/media.git
synced 2025-05-07 15:40:37 +08:00

If seek is called for a non-seekable period, when the period is prepared the start position will be updated from the seek position to zero. Because the start position is part of the renderer offset for the first loaded period holder, after the update the renderer offset start position and the new start position would no longer cancel out, leading to the player position being negative. The first period holder's renderer offset is the fixed base offset (60 seconds) plus its start position, but the start position is always subtracted. Avoid subtracting the start position for the first period holder so that when it changes there is no need to update the renderer offset. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=162188133