Handle unsupported format xHE-AAC in FfmpegAudioRenderer

Issue: androidx/media#803
PiperOrigin-RevId: 584333812
This commit is contained in:
rohks 2023-11-21 08:31:15 -08:00 committed by Copybara-Service
parent 0b22a7a0d8
commit 1360548649
2 changed files with 5 additions and 1 deletions

View File

@ -93,6 +93,8 @@
([#710](https://github.com/androidx/media/pull/710)).
* MIDI: Fix issue where seeking forward skips the Program Change events
([#704](https://github.com/androidx/media/issues/704).
* Handle unsupported format `xHE-AAC` in `FfmpegAudioRenderer`
([#803](https://github.com/androidx/media/issues/803)).
* Leanback extension:
* Cast Extension:
* Sanitize creation of a `Timeline` to not crash the app when loading

View File

@ -97,7 +97,9 @@ public final class FfmpegAudioRenderer extends DecoderAudioRenderer<FfmpegAudioD
return C.FORMAT_UNSUPPORTED_TYPE;
} else if (!FfmpegLibrary.supportsFormat(mimeType)
|| (!sinkSupportsFormat(format, C.ENCODING_PCM_16BIT)
&& !sinkSupportsFormat(format, C.ENCODING_PCM_FLOAT))) {
&& !sinkSupportsFormat(format, C.ENCODING_PCM_FLOAT))
|| (mimeType.equals(MimeTypes.AUDIO_AAC)
&& MimeTypes.getEncoding(mimeType, format.codecs) == C.ENCODING_AAC_XHE)) {
return C.FORMAT_UNSUPPORTED_SUBTYPE;
} else if (format.cryptoType != C.CRYPTO_TYPE_NONE) {
return C.FORMAT_UNSUPPORTED_DRM;