mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
ExoPlayer used to call `stop()` before `release()`. This was removed in
<unknown commit>.
A framework bug introduced in Android 11 (API 30) resulted in some
DRM -> clear transitions failing during `MediaCodec.configure()`. An
investigation in Issue: google/ExoPlayer#8696 and b/191966399 identified that this was
due to `release()` returning 'too early' and the subsequent
`configure()` call was then trying to re-use a `Surface` that hadn't
been fully detached from the previous codec. This was fixed in
Android 13 (API 33) with http://r.android.com/2094347.
ExoPlayer worked around the framework bug by adding an arbitrary 50ms
sleep after a failed codec initialization, followed by retrying. This
was enough to resolve the problem in the test scenario on a OnePlus
AC2003.
Issue: androidx/media#1497 points out that 50ms might not be the appropriate delay
for all devices, so it's an incomplete fix. They suggested re-adding the
`MediaCodec.stop()` call instead. This also reliably resolves the issue
on the OnePlus AC2003 (with neither workaround in place, the problem
repros almost immediately).
PiperOrigin-RevId: 646461943
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| cast | ||
| common | ||
| container | ||
| database | ||
| datasource | ||
| datasource_cronet | ||
| datasource_okhttp | ||
| datasource_rtmp | ||
| decoder | ||
| decoder_av1 | ||
| decoder_ffmpeg | ||
| decoder_flac | ||
| decoder_midi | ||
| decoder_opus | ||
| decoder_vp9 | ||
| effect | ||
| exoplayer | ||
| exoplayer_dash | ||
| exoplayer_hls | ||
| exoplayer_ima | ||
| exoplayer_rtsp | ||
| exoplayer_smoothstreaming | ||
| exoplayer_workmanager | ||
| extractor | ||
| muxer | ||
| session | ||
| test_data | ||
| test_exoplayer_playback | ||
| test_session_common | ||
| test_session_current | ||
| test_utils | ||
| test_utils_robolectric | ||
| transformer | ||
| ui | ||
| ui_leanback | ||
| lint.xml | ||