google / google/ExoPlayer

Audio with only one sample keeps player in infinite READY state

Open
#6,459 11 comments 0 reactions 1 assignee Claimed by @andrewlewis View on GitHub
bug
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

### [REQUIRED] Issue description
When playing clear lead on DRM content, the player stops at "randomly" places close to the encrypted content(usually within 1 sec to where it should have stopped). Pressing play again will let it play for about 100ms to 1sec. Doing this 3-5 times will eventually get it to the end and playback will stop for good.

It should play everything it has in the first go, stopping at the end. Pressing play after it has stopped should not make it play more, but rather give a new error straight away.

### [REQUIRED] Reproduction steps

This can very easily be reproduced with the sample app:

1. Enable `playClearSamplesWithoutKeys` so it plays the clear lead. This can simply be achieved by hardcoding to `true` in `DefaultRenderersFactory.java` line 265(if playing linked content).

2. Remove the licenseUrl string so the key request will fail after playing clear lead. This can be done by sending in an empty string in line 486 in `PlayerActivity.java`.

3. Play sample content described below.

4. Make it play until it stops(happens after 8 or 9 seconds).

5. Press play and you will hear a short sample < 1 sec (this varies, but it is short).

Note: If you print out the position of the player in `onPlayerError()`, you will see that it stops at random position for the same track, and that it can be played for a brief second some times after it has stopped for the first time.

### [REQUIRED] Link to test content
```
{
"name": "WV: Secure SD (cenc,MP4,H264)",
"uri": "https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears_sd.mpd",
"drm_scheme": "widevine",
"drm_license_url": "https://proxy.uat.widevine.com/proxy?provider=widevine_test"
}
```

### [REQUIRED] A full bug report captured from the device
N/A

### [REQUIRED] Version of ExoPlayer being used
2.10.4 and 2.10.5

### [REQUIRED] Device(s) and version(s) of Android being used
Pixel 3, Android 10

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.