Commit 87d8907b by olly Committed by Andrew Lewis

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)

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: <provide reason>"
* 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: <provide reason>". 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
parent 11ce80d0
...@@ -43,7 +43,7 @@ import java.util.List; ...@@ -43,7 +43,7 @@ import java.util.List;
private final String codecName; private final String codecName;
@Nullable private final byte[] extraData; @Nullable private final byte[] extraData;
private final @C.Encoding int encoding; @C.Encoding private final int encoding;
private final int outputBufferSize; private final int outputBufferSize;
private long nativeContext; // May be reassigned on resetting the codec. private long nativeContext; // May be reassigned on resetting the codec.
...@@ -98,7 +98,8 @@ import java.util.List; ...@@ -98,7 +98,8 @@ import java.util.List;
} }
@Override @Override
protected @Nullable FfmpegDecoderException decode( @Nullable
protected FfmpegDecoderException decode(
DecoderInputBuffer inputBuffer, SimpleOutputBuffer outputBuffer, boolean reset) { DecoderInputBuffer inputBuffer, SimpleOutputBuffer outputBuffer, boolean reset) {
if (reset) { if (reset) {
nativeContext = ffmpegReset(nativeContext, extraData); nativeContext = ffmpegReset(nativeContext, extraData);
...@@ -159,7 +160,8 @@ import java.util.List; ...@@ -159,7 +160,8 @@ import java.util.List;
} }
/** Returns the encoding of output audio. */ /** Returns the encoding of output audio. */
public @C.Encoding int getEncoding() { @C.Encoding
public int getEncoding() {
return encoding; return encoding;
} }
...@@ -167,7 +169,8 @@ import java.util.List; ...@@ -167,7 +169,8 @@ import java.util.List;
* Returns FFmpeg-compatible codec-specific initialization data ("extra data"), or {@code null} if * Returns FFmpeg-compatible codec-specific initialization data ("extra data"), or {@code null} if
* not required. * not required.
*/ */
private static @Nullable byte[] getExtraData(String mimeType, List<byte[]> initializationData) { @Nullable
private static byte[] getExtraData(String mimeType, List<byte[]> initializationData) {
switch (mimeType) { switch (mimeType) {
case MimeTypes.AUDIO_AAC: case MimeTypes.AUDIO_AAC:
case MimeTypes.AUDIO_OPUS: case MimeTypes.AUDIO_OPUS:
......
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