Commit 14e582b7 by aquilescanta Committed by Ian Baker

Remove ExoPlayer uses of ERROR_CODE_DRM_UNSPECIFIED

PiperOrigin-RevId: 385783671
parent d47d1ebf
......@@ -564,7 +564,8 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
// better diagnosis tools were provided, we treat this as a system error.
return PlaybackException.ERROR_CODE_DRM_SYSTEM_ERROR;
} else {
return PlaybackException.ERROR_CODE_DRM_UNSPECIFIED;
// The error happened during the license request.
return PlaybackException.ERROR_CODE_DRM_LICENSE_ACQUISITION_FAILED;
}
}
......
......@@ -570,12 +570,10 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
if (FrameworkMediaCrypto.WORKAROUND_DEVICE_NEEDS_KEYS_TO_CONFIGURE_CODEC) {
@DrmSession.State int drmSessionState = codecDrmSession.getState();
if (drmSessionState == DrmSession.STATE_ERROR) {
// TODO(internal b/184262323): Assign a proper error code, once we attach that information
// to DrmSessionException.
DrmSessionException drmSessionException =
Assertions.checkNotNull(codecDrmSession.getError());
throw createRendererException(
codecDrmSession.getError(),
inputFormat,
PlaybackException.ERROR_CODE_DRM_UNSPECIFIED);
drmSessionException, inputFormat, drmSessionException.errorCode);
} else if (drmSessionState != DrmSession.STATE_OPENED_WITH_KEYS) {
// Wait for keys.
return;
......
......@@ -558,7 +558,7 @@ public final class SampleQueueTest {
when(mockDrmSession.getError())
.thenReturn(
new DrmSession.DrmSessionException(
new Exception(), PlaybackException.ERROR_CODE_DRM_UNSPECIFIED));
new Exception(), PlaybackException.ERROR_CODE_DRM_SYSTEM_ERROR));
assertReadNothing(/* formatRequired= */ false);
try {
sampleQueue.maybeThrowError();
......
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