mirror of
https://github.com/androidx/media.git
synced 2025-05-07 07:30:22 +08:00

If a renderer is reading ahead of the playing period, seeking within the playing period would fail, because renderers would not be disabled but then try to read from SampleStreams that have a released period. Also, in the same circumstances, seeking within the reading period would fail, because all renderers would be disabled, but their sample streams have already been read. When they are reenabled they expect to see a format but don't receive one. In both cases, seeking can just clear the timeline. This only occurs in rare circumstances when the player is reading ahead, so the cost of re-preparing will not be incurred often, and allows the seeking logic to be simpler. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=129891060