Don't restore DRM keys before releasing them

PiperOrigin-RevId: 375436117
This commit is contained in:
ibaker 2021-05-24 10:03:33 +01:00 committed by Oliver Woodman
parent 81b8bb671c
commit b87a4c04e0
2 changed files with 4 additions and 5 deletions

View file

@ -12,6 +12,9 @@
* HLS
* Fix a bug where skipping into spliced-in chunks triggered an assertion
error ([#8937](https://github.com/google/ExoPlayer/issues/8937).
* DRM:
* Don't restore offline keys before releasing them. In OEMCrypto v16+ keys
must be released without restoring them first.
### 2.14.0 (2021-05-13)

View file

@ -430,11 +430,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
case DefaultDrmSessionManager.MODE_RELEASE:
Assertions.checkNotNull(offlineLicenseKeySetId);
Assertions.checkNotNull(this.sessionId);
// It's not necessary to restore the key before releasing it but this serves as a good
// fast-failure check.
if (restoreKeys()) {
postKeyRequest(offlineLicenseKeySetId, ExoMediaDrm.KEY_TYPE_RELEASE, allowRetry);
}
postKeyRequest(offlineLicenseKeySetId, ExoMediaDrm.KEY_TYPE_RELEASE, allowRetry);
break;
default:
break;