Playback freeze at the end of the first period on multi-period Dash streams
- Dominant language
- Java
- Stars
- 21.9k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Based on my debugging analysis the freeze happens at the end of the first period.
I have observed that when BufferInfo->presentationTimeUs reach 1000008704000 value (first period duration="PT8.72S") **android.media.MediaCodec#dequeueOutputBuffer() returns -1** for an indefinite period of time and the playback gets stuck at this position.
com/google/android/exoplayer2/mediacodec/SynchronousMediaCodecAdapter.java:122
screenshot with my logs:

Logs I have added:

With the previous Exoplayer version we have used 2.12.1 this behavior is different and there is no freeze, dequeueOutputBuffer() returns -1 for a short period, and then presentationTimeUs jumps to 8736000.

Played manifest
[manifest (7).txt](https://github.com/google/ExoPlayer/files/8048887/manifest.7.txt)
Is this caused by an Exoplayer or MediaCodec issue? Is there any workaround we can do to bypass the problem?
Logs:
[logcat.txt](https://github.com/google/ExoPlayer/files/8048994/logcat.txt)
[bugreport-SEI700TE-RTT0.210618.003-2022-02-11-15-36-12.zip](https://github.com/google/ExoPlayer/files/8049000/bugreport-SEI700TE-RTT0.210618.003-2022-02-11-15-36-12.zip)
Stream (Note: Stream URLs will expire after a while or there might be some geo-blocking issues):
"uri": "http://vcdn.tv.comhem.se/cu/dash/cenc/HD/50fps/high/2ch/2nd/76806/1644213600/1644217500/manifest"
"drm_scheme": "widevine"
"drm_license_uri": "https://api-staging.tv.comhem.se/license/widevine/Lcb5nmz7ZmV20zplmkPXUt8ieyXIcMBSO58OxfZ9e__hPNcfaeMHYdmqeHEG0Zrt-3CdOmpOCIQvBeJQDGoxK-kHAx3ucpL85XFK2R93_UawFXr-3ezVbntIa1aEHVUsv6CG3x-4cpYKZK601ryHgtjyOabqzMoIoKkAgatFqdQHlbCF4WWs_YbEzuI5mCOV"
ExoPlayer version: 2.16.1
Android device: Technicolor UZX8020CHM (https://sites.google.com/view/droid-tv/pay-tv-provider/com-hem-tv-hub) -> Android 9,
SEI Robotics SEI700TE (https://www.androidtv-guide.com/pay-tv-provider/tele2-tv-hub-mini/) -> Android 11
Contributor guide
Assessment
This issue has not been assessed yet.