Assume text tracks in protected SmoothStreaming are not protected

Issue: #4838
PiperOrigin-RevId: 222805051
This commit is contained in:
olly 2018-11-26 12:30:23 +00:00 committed by Andrew Lewis
parent d6b6600a28
commit 3e150b54f4

View File

@ -378,8 +378,12 @@ public class SsManifestParser implements ParsingLoadable.Parser<SsManifest> {
DrmInitData drmInitData = new DrmInitData(new SchemeData(protectionElement.uuid, DrmInitData drmInitData = new DrmInitData(new SchemeData(protectionElement.uuid,
MimeTypes.VIDEO_MP4, protectionElement.data)); MimeTypes.VIDEO_MP4, protectionElement.data));
for (StreamElement streamElement : streamElementArray) { for (StreamElement streamElement : streamElementArray) {
for (int i = 0; i < streamElement.formats.length; i++) { int type = streamElement.type;
streamElement.formats[i] = streamElement.formats[i].copyWithDrmInitData(drmInitData); if (type == C.TRACK_TYPE_VIDEO || type == C.TRACK_TYPE_AUDIO) {
Format[] formats = streamElement.formats;
for (int i = 0; i < formats.length; i++) {
formats[i] = formats[i].copyWithDrmInitData(drmInitData);
}
} }
} }
} }