Remove @UnknownInitialization DefaultCodec parameter
Using an uninitialised object seems unusual. PiperOrigin-RevId: 640514501
This commit is contained in:
parent
67c19f87a7
commit
f3a9c74de2
@ -53,7 +53,6 @@ import java.io.IOException;
|
|||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import org.checkerframework.checker.initialization.qual.UnknownInitialization;
|
|
||||||
import org.checkerframework.checker.nullness.qual.EnsuresNonNullIf;
|
import org.checkerframework.checker.nullness.qual.EnsuresNonNullIf;
|
||||||
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||||
|
|
||||||
@ -163,7 +162,8 @@ public final class DefaultCodec implements Codec {
|
|||||||
} else {
|
} else {
|
||||||
errorCode = ExportException.ERROR_CODE_FAILED_RUNTIME_CHECK;
|
errorCode = ExportException.ERROR_CODE_FAILED_RUNTIME_CHECK;
|
||||||
}
|
}
|
||||||
throw createExportException(e, errorCode, mediaCodecName);
|
throw createExportException(
|
||||||
|
configurationMediaFormat, isVideo, isDecoder, e, errorCode, mediaCodecName);
|
||||||
}
|
}
|
||||||
this.mediaCodec = mediaCodec;
|
this.mediaCodec = mediaCodec;
|
||||||
this.inputSurface = inputSurface;
|
this.inputSurface = inputSurface;
|
||||||
@ -442,6 +442,9 @@ public final class DefaultCodec implements Codec {
|
|||||||
|
|
||||||
private ExportException createExportException(Exception cause) {
|
private ExportException createExportException(Exception cause) {
|
||||||
return createExportException(
|
return createExportException(
|
||||||
|
configurationMediaFormat,
|
||||||
|
isVideo,
|
||||||
|
isDecoder,
|
||||||
cause,
|
cause,
|
||||||
isDecoder
|
isDecoder
|
||||||
? ExportException.ERROR_CODE_DECODING_FAILED
|
? ExportException.ERROR_CODE_DECODING_FAILED
|
||||||
@ -450,8 +453,10 @@ public final class DefaultCodec implements Codec {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Creates an {@link ExportException} with specific {@link MediaCodec} details. */
|
/** Creates an {@link ExportException} with specific {@link MediaCodec} details. */
|
||||||
private ExportException createExportException(
|
private static ExportException createExportException(
|
||||||
@UnknownInitialization DefaultCodec this,
|
MediaFormat configurationMediaFormat,
|
||||||
|
boolean isVideo,
|
||||||
|
boolean isDecoder,
|
||||||
Exception cause,
|
Exception cause,
|
||||||
@ExportException.ErrorCode int errorCode,
|
@ExportException.ErrorCode int errorCode,
|
||||||
String mediaCodecName) {
|
String mediaCodecName) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user