Extend async crypto flag to audio

This is only supported from API 35

PiperOrigin-RevId: 628014091
This commit is contained in:
tonihei 2024-04-25 03:05:16 -07:00 committed by Copybara-Service
parent d0d6ce52a5
commit ed1cf35f30

View File

@ -134,9 +134,8 @@ import java.nio.ByteBuffer;
if (Util.SDK_INT < 34) { if (Util.SDK_INT < 34) {
return false; return false;
} }
// TODO: b/316565675 - Remove restriction to video once MediaCodec supports // CONFIGURE_FLAG_USE_CRYPTO_ASYNC only works for audio on API 35+ (see b/316565675).
// CONFIGURE_FLAG_USE_CRYPTO_ASYNC for audio too return Util.SDK_INT >= 35 || MimeTypes.isVideo(format.sampleMimeType);
return MimeTypes.isVideo(format.sampleMimeType);
} }
} }