mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
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
This commit is contained in:
parent
5117138481
commit
81a13a638d
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue