playback: use ffmpeg first

Always decode with ffmpeg before decoding with MediaCodec.

MediaCodec is unreliable on some devices in such a way as to cause a
full loading failure on them. Prevent this by using ffmpeg.
This commit is contained in:
Alexander Capehart
2023-12-16 16:33:54 -07:00
parent bf1cbad1da
commit cd42c77304
2 changed files with 6 additions and 2 deletions
@@ -121,14 +121,14 @@ class PlaybackService :
// battery/apk size/cache size
val audioRenderer = RenderersFactory { handler, _, audioListener, _, _ ->
arrayOf(
FfmpegAudioRenderer(handler, audioListener, replayGainProcessor),
MediaCodecAudioRenderer(
this,
MediaCodecSelector.DEFAULT,
handler,
audioListener,
AudioCapabilities.DEFAULT_AUDIO_CAPABILITIES,
replayGainProcessor),
FfmpegAudioRenderer(handler, audioListener, replayGainProcessor))
replayGainProcessor))
}
player =