google / google/ExoPlayer

IllegalStateException thrown from MediaCodec.setOutputSurface on Android 12

Open
#10,730 0 comments 0 reactions 1 assignee Assigned to @microkatz View on GitHub
bug needs triage
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

### ExoPlayer Version

2.18.1

### Devices that reproduce the issue

Moto G60 run Android 12

### Devices that do not reproduce the issue

Emulator running Android API level 33

### Reproducible in the demo app?

Not tested

### Reproduction steps

1. Checkout https://github.com/sailesha/set-surface
2. Run on device
3. Let app play until it stops switching videos

### Expected result

No errors

### Actual result

Playback Exception due to an IllegalStateException thrown from MediaCodec.setOutputSurface

### Media

Media URLs in sample app above

### Bug Report

- [X] You will email the zip file produced by `adb bugreport` to dev.exoplayer@gmail.com after filing this issue.

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.