Attach ExoMediaCryptoType for progressive streams

PiperOrigin-RevId: 311628160
This commit is contained in:
olly 2020-05-15 00:27:33 +01:00 committed by Andrew Lewis
parent bc96d3a93c
commit 4736a102f8

View File

@ -730,6 +730,11 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
trackFormat = trackFormat.copyWithBitrate(icyHeaders.bitrate); trackFormat = trackFormat.copyWithBitrate(icyHeaders.bitrate);
} }
} }
if (trackFormat.drmInitData != null) {
trackFormat =
trackFormat.copyWithExoMediaCryptoType(
drmSessionManager.getExoMediaCryptoType(trackFormat.drmInitData));
}
trackArray[i] = new TrackGroup(trackFormat); trackArray[i] = new TrackGroup(trackFormat);
} }
isLive = length == C.LENGTH_UNSET && seekMap.getDurationUs() == C.TIME_UNSET; isLive = length == C.LENGTH_UNSET && seekMap.getDurationUs() == C.TIME_UNSET;