Commit 2a70a58f by andrewlewis Committed by Oliver Woodman

Fix non-DRM playback.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128353039
parent eca3edb9
......@@ -176,10 +176,12 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
if (!MimeTypes.isVideo(mimeType)) {
return FORMAT_UNSUPPORTED_TYPE;
}
DrmInitData drmInitData = format.drmInitData;
boolean requiresSecureDecryption = false;
for (int i = 0; i < drmInitData.schemeDataCount; i++) {
requiresSecureDecryption |= drmInitData.get(i).requiresSecureDecryption;
DrmInitData drmInitData = format.drmInitData;
if (drmInitData != null) {
for (int i = 0; i < drmInitData.schemeDataCount; i++) {
requiresSecureDecryption |= drmInitData.get(i).requiresSecureDecryption;
}
}
MediaCodecInfo decoderInfo = mediaCodecSelector.getDecoderInfo(mimeType,
requiresSecureDecryption);
......
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