Commit 235c6311 by olly Committed by Oliver Woodman

FfmpegAudioRenderer should use UNSUPPORTED_TYPE for non-audio formats

Issue: #2159
PiperOrigin-RevId: 301345559
parent 42b8fe26
......@@ -89,10 +89,10 @@ public final class FfmpegAudioRenderer extends SimpleDecoderAudioRenderer {
@Override
@FormatSupport
protected int supportsFormatInternal(Format format) {
Assertions.checkNotNull(format.sampleMimeType);
if (!FfmpegLibrary.isAvailable()) {
String mimeType = Assertions.checkNotNull(format.sampleMimeType);
if (!FfmpegLibrary.isAvailable() || !MimeTypes.isAudio(mimeType)) {
return FORMAT_UNSUPPORTED_TYPE;
} else if (!FfmpegLibrary.supportsFormat(format.sampleMimeType) || !isOutputSupported(format)) {
} else if (!FfmpegLibrary.supportsFormat(mimeType) || !isOutputSupported(format)) {
return FORMAT_UNSUPPORTED_SUBTYPE;
} else if (format.drmInitData != null && format.exoMediaCryptoType == null) {
return FORMAT_UNSUPPORTED_DRM;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment