mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00

This change also ensures that format changes are read whilst the renderer is enabled but without a codec. This is necessary to ensure the drm session is updated (or replaced). Updating the format is also needed so that the up-to-date format is used in the case that the codec is initialized later due to the surface being set. Previously, if an ABR change occurred between the format being read and the surface being attached, we would instantiate the codec and then immediately have to reconfigure it when as a result of reading the up-to-date format. For a non-adaptive codec this resulted in the codec being immediately released and instantiated again! Issue: #2582 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=151608096