### ExoPlayer Version 2.18.0 ### Devices that reproduce the issue device independent ### Devices that do not reproduce the issue _No response_ ### Reproducible in the demo app? Yes ### Reproduction steps 1. Play the attached media in the demo apply 2. Seek to the position shortly before the end of the media 3. Wait until the end of the media ### Expected result Player changes the playback state to Player.STATE_ENDED at the end of the media ### Actual result Player stays in the playback state Player.STATE_READY This happens because MetadataRenderer gets stuck right after the start of the playback and can't output pending metadata with pendingMetadataTimestampUs=1657987406382857. This timestamp corresponds to the presentationTime of the Event in the EventStream in the mpd. When removing EventStream from the mpd or setting presentationTime of the Event to presentationTime - presentationTimeOffset in the mpd, issue disappears. ### Media by email ### Bug Report - [X] You will email the zip file produced by `adb bugreport` to dev.exoplayer@gmail.com after filing this issue.