mirror of
https://github.com/androidx/media.git
synced 2025-05-15 11:39:56 +08:00

This makes the reading period advance early as expected at the end of an ad period. Before this change the reading position of the metadata renderer prevented advancing the period until metadata arrived after the start position of the following period. Only then the reading position of the metadata renderer is updated and beyond the start position of the following period which is a condition to advance the reading period. Because transitioning to the next period is a virtual transition and the SharedMediaPeriod keeps reading from the same underlying sample streams, the metadata renderer can safely be ignored for this check. #minor-release PiperOrigin-RevId: 432646037 (cherry picked from commit c7c75173224057defd031aa30bbf8346442700a6)