Skip to content

Commit

Permalink
Add missing Nullable annotation
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 459485334
(cherry picked from commit 752e82d)
  • Loading branch information
christosts authored and rohitjoins committed Jul 7, 2022
1 parent d39075a commit f9f6cb3
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1569,7 +1569,7 @@ protected CodecMaxValues getCodecMaxValues(
}
if (haveUnknownDimensions) {
Log.w(TAG, "Resolutions unknown. Codec max resolution: " + maxWidth + "x" + maxHeight);
Point codecMaxSize = getCodecMaxSize(codecInfo, format);
@Nullable Point codecMaxSize = getCodecMaxSize(codecInfo, format);
if (codecMaxSize != null) {
maxWidth = max(maxWidth, codecMaxSize.x);
maxHeight = max(maxHeight, codecMaxSize.y);
Expand Down Expand Up @@ -1597,8 +1597,10 @@ protected MediaCodecDecoderException createDecoderException(
*
* @param codecInfo Information about the {@link MediaCodec} being configured.
* @param format The {@link Format} for which the codec is being configured.
* @return The maximum video size to use, or null if the size of {@code format} should be used.
* @return The maximum video size to use, or {@code null} if the size of {@code format} should be
* used.
*/
@Nullable
private static Point getCodecMaxSize(MediaCodecInfo codecInfo, Format format) {
boolean isVerticalVideo = format.height > format.width;
int formatLongEdgePx = isVerticalVideo ? format.height : format.width;
Expand Down

0 comments on commit f9f6cb3

Please sign in to comment.