Commit 525f151f by bachinger Committed by Oliver Woodman

Check whether drm session manager of sample queue is null

PiperOrigin-RevId: 348688419
parent ab4c92e9
......@@ -870,7 +870,10 @@ public class SampleQueue implements TrackOutput {
@Nullable DrmInitData newDrmInitData = newFormat.drmInitData;
outputFormatHolder.format =
newFormat.copyWithExoMediaCryptoType(drmSessionManager.getExoMediaCryptoType(newFormat));
drmSessionManager != null
? newFormat.copyWithExoMediaCryptoType(
drmSessionManager.getExoMediaCryptoType(newFormat))
: newFormat;
outputFormatHolder.drmSession = currentDrmSession;
if (drmSessionManager == null) {
// This sample queue is not expected to handle DRM. Nothing to do.
......
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