Add missing call and rename getErrorCodeForMediaDrmErrorCode
PiperOrigin-RevId: 383251000
This commit is contained in:
parent
6dbc1eb189
commit
5b2e854344
@ -1116,7 +1116,7 @@ public final class C {
|
||||
private static final int ERROR_PROVISIONING_RETRY = 28;
|
||||
|
||||
@PlaybackException.ErrorCode
|
||||
public static int getErrorCodeCorrespondingToPlatformDrmErrorCode(int mediaDrmErrorCode) {
|
||||
public static int getErrorCodeForMediaDrmErrorCode(int mediaDrmErrorCode) {
|
||||
switch (mediaDrmErrorCode) {
|
||||
case ERROR_PROVISIONING_CONFIG:
|
||||
case ERROR_PROVISIONING_PARSE:
|
||||
|
@ -3120,10 +3120,12 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
@ErrorCode
|
||||
public static int mediaDrmStateExceptionToErrorCode(Throwable throwable) {
|
||||
@Nullable
|
||||
String diagnosticsInfo = ((MediaDrm.MediaDrmStateException) throwable).getDiagnosticInfo();
|
||||
return Util.getErrorCodeFromPlatformDiagnosticsInfo(diagnosticsInfo);
|
||||
int drmErrorCode = Util.getErrorCodeFromPlatformDiagnosticsInfo(diagnosticsInfo);
|
||||
return C.getErrorCodeForMediaDrmErrorCode(drmErrorCode);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1302,7 +1302,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
|
||||
}
|
||||
} catch (CryptoException e) {
|
||||
throw createRendererException(
|
||||
e, inputFormat, C.getErrorCodeCorrespondingToPlatformDrmErrorCode(e.getErrorCode()));
|
||||
e, inputFormat, C.getErrorCodeForMediaDrmErrorCode(e.getErrorCode()));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -1373,7 +1373,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
|
||||
}
|
||||
} catch (CryptoException e) {
|
||||
throw createRendererException(
|
||||
e, inputFormat, C.getErrorCodeCorrespondingToPlatformDrmErrorCode(e.getErrorCode()));
|
||||
e, inputFormat, C.getErrorCodeForMediaDrmErrorCode(e.getErrorCode()));
|
||||
}
|
||||
|
||||
resetInputBuffer();
|
||||
|
Loading…
x
Reference in New Issue
Block a user