Commit 81a13a63 by krocard Committed by Oliver Woodman

A passthrough codec is only needed for DRM

In passthrough MediaCodec is not used except if
the format has a DRM.

Nevertheless the code was still requiring that a
passthrough decoder be present even if it was not going to be
used (aka no drm).

PiperOrigin-RevId: 309947271
parent 51171384
...@@ -219,7 +219,8 @@ public class MediaCodecAudioRenderer extends MediaCodecRenderer implements Media ...@@ -219,7 +219,8 @@ public class MediaCodecAudioRenderer extends MediaCodecRenderer implements Media
boolean supportsFormatDrm = supportsFormatDrm(format); boolean supportsFormatDrm = supportsFormatDrm(format);
if (supportsFormatDrm if (supportsFormatDrm
&& usePassthrough(format.channelCount, mimeType) && usePassthrough(format.channelCount, mimeType)
&& MediaCodecUtil.getPassthroughDecoderInfo() != null) { // A Passthrough decoder is only needed to decode the DRM encryption.
&& (format.drmInitData == null || MediaCodecUtil.getPassthroughDecoderInfo() != null)) {
return RendererCapabilities.create(FORMAT_HANDLED, ADAPTIVE_NOT_SEAMLESS, tunnelingSupport); return RendererCapabilities.create(FORMAT_HANDLED, ADAPTIVE_NOT_SEAMLESS, tunnelingSupport);
} }
if ((MimeTypes.AUDIO_RAW.equals(mimeType) if ((MimeTypes.AUDIO_RAW.equals(mimeType)
......
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