From 87d8907b4ba1b7e72926950d403d6cf9856cf89b Mon Sep 17 00:00:00 2001 From: olly Date: Fri, 23 Apr 2021 11:17:27 +0100 Subject: [PATCH] Fix 4 ErrorProneStyle findings: * @Encoding is not a TYPE_USE annotation, so should appear before any modifiers and after Javadocs. (see go/java-style#s4.8.5-annotations) (2 times) * @Nullable is not a TYPE_USE annotation, so should appear before any modifiers and after Javadocs. (see go/java-style#s4.8.5-annotations) (2 times) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This CL looks good? Just LGTM and Approve it! This CL doesn’t look good? This is what you can do: * Suggest a fix on the CL (go/how-to-suggest-fix). * Revert this CL, by replying "REVERT: " * File a bug under go/error-prone-bug for category ErrorProneStyle if the change looks generally problematic. * Revert this CL and not get a CL that cleans up these paths in the future by replying "BLOCKLIST: ". This is not reversible! We recommend to opt out the respective paths in your CL Robot configuration instead: go/clrobot-opt-out. This CL was generated by CL Robot - a tool that cleans up code findings (go/clrobot). The affected code paths have been enabled for CL Robot in //depot/google3/java/com/google/android/libraries/exoplayer/METADATA which is reachable following include_presubmits from //depot/google3/third_party/java_src/android_libs/media/METADATA. Anything wrong with the signup? File a bug at go/clrobot-bug. #codehealth PiperOrigin-RevId: 370048160 --- .../exoplayer2/ext/ffmpeg/FfmpegAudioDecoder.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/extensions/ffmpeg/src/main/java/com/google/android/exoplayer2/ext/ffmpeg/FfmpegAudioDecoder.java b/extensions/ffmpeg/src/main/java/com/google/android/exoplayer2/ext/ffmpeg/FfmpegAudioDecoder.java index 0600254be5..eac96a9a31 100644 --- a/extensions/ffmpeg/src/main/java/com/google/android/exoplayer2/ext/ffmpeg/FfmpegAudioDecoder.java +++ b/extensions/ffmpeg/src/main/java/com/google/android/exoplayer2/ext/ffmpeg/FfmpegAudioDecoder.java @@ -43,7 +43,7 @@ import java.util.List; private final String codecName; @Nullable private final byte[] extraData; - private final @C.Encoding int encoding; + @C.Encoding private final int encoding; private final int outputBufferSize; private long nativeContext; // May be reassigned on resetting the codec. @@ -98,7 +98,8 @@ import java.util.List; } @Override - protected @Nullable FfmpegDecoderException decode( + @Nullable + protected FfmpegDecoderException decode( DecoderInputBuffer inputBuffer, SimpleOutputBuffer outputBuffer, boolean reset) { if (reset) { nativeContext = ffmpegReset(nativeContext, extraData); @@ -159,7 +160,8 @@ import java.util.List; } /** Returns the encoding of output audio. */ - public @C.Encoding int getEncoding() { + @C.Encoding + public int getEncoding() { return encoding; } @@ -167,7 +169,8 @@ import java.util.List; * Returns FFmpeg-compatible codec-specific initialization data ("extra data"), or {@code null} if * not required. */ - private static @Nullable byte[] getExtraData(String mimeType, List initializationData) { + @Nullable + private static byte[] getExtraData(String mimeType, List initializationData) { switch (mimeType) { case MimeTypes.AUDIO_AAC: case MimeTypes.AUDIO_OPUS: