mirror of
https://github.com/androidx/media.git
synced 2025-05-08 16:10:38 +08:00

When track is changed during playback, `playbackPositionUs` may be in middle of a chunk and `loadPositionUs` should be the start of that chunk. In this situation `loadPositionUs` can be less than the current `playbackPositionUs`, resulting into negative `bufferedDurationUs`. It translates to having no buffer and hence we should send `0` for `bufferedDurationUs` when creating new instances of `CmcdData.Factory`. Issue: androidx/media#888 #minor-release PiperOrigin-RevId: 591099785 (cherry picked from commit 7f6596bab217847617947b61ded64b7aba58a194)