MediaCodecAudioRenderer error when playing flac from demo app
- Dominant language
- Java
- Stars
- 21.9k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
**Issue description**
Errors when playing flac files from the demo app on Nokia 8 device with Android 9, model TA-1004. The build-in flac sample provided in the demo can’t be played at all and returns an error
```
com.google.android.exoplayer2.ExoPlaybackException: MediaCodecAudioRenderer error, index=3, format=Format(null, null, null, audio/flac, null, -1, null, [-1, -1, -1.0], [2, 44100]), format_supported=YES
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:542)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:198)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: com.google.android.exoplayer2.mediacodec.MediaCodecDecoderException: Decoder failed: OMX.qti.audio.decoder.flac
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.createDecoderException(MediaCodecRenderer.java:984)
```
I have added by own flac files to the demo app and was able to play them however there are permanent errors in the console and the progress of the track moves faster than it should, probably because the frames are skipped. Both errors happen with checkbox “Prefer Extension Decoders” On and Off.
2020-11-22 09:34:20.413 11101-29120/com.google.android.exoplayer2.demo E/AudioTrack: Discontinuity detected [expected 1950476, got 2229115]
**Reproduction steps**
In the Exoplayer demo app choose Misc section, then Google Play (FLAC) to reproduce MediaCodecAudioRenderer error.
To reproduce “Discontinuity Detected” error try to play any file from the FLAC section with my flac content.
**Link to test content**
json file emailed.
**A full bug report captured from the device**
full bug report emailed.
**Version of ExoPlayer being used**
2.12.1
**Device(s) and version(s) of Android being used**
Nokia 8 with Android 9. The simulator and few other devices we tested demo app did not have such errors.
Attached are both logs for the error with google flac sample and for “Discontinuity detected” errors.
[error_MediaCodecAudioRenderer.log](https://github.com/google/ExoPlayer/files/5579193/error_MediaCodecAudioRenderer.log)
[error_discontinuity.log](https://github.com/google/ExoPlayer/files/5579194/error_discontinuity.log)
Contributor guide
Assessment
This issue has not been assessed yet.