Commit 4b957cce by eguven Committed by Oliver Woodman

Fix streaming license renew error

When the first streaming license request response provided to mediaDrm it might return an empty array instead of null.
This was set to offlineLicenseKeySetId which made the work like there is a valid offline license.
Simplified the code and made it to set offlineLicenseKeySetId only if there is sensible data in keySetId.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144843144
parent 51f96374
......@@ -564,9 +564,7 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto> implements DrmSe
}
} else {
byte[] keySetId = mediaDrm.provideKeyResponse(sessionId, (byte[]) response);
if (offlineLicenseKeySetId != null && (keySetId == null || keySetId.length == 0)) {
// This means that the keySetId is unchanged.
} else {
if (keySetId != null && keySetId.length != 0) {
offlineLicenseKeySetId = keySetId;
}
state = STATE_OPENED_WITH_KEYS;
......
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