Add missing Nullable annotation
PiperOrigin-RevId: 459485334
This commit is contained in:
parent
a83ab05aec
commit
cb87b7432f
@ -1572,7 +1572,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
|
|||||||
}
|
}
|
||||||
if (haveUnknownDimensions) {
|
if (haveUnknownDimensions) {
|
||||||
Log.w(TAG, "Resolutions unknown. Codec max resolution: " + maxWidth + "x" + maxHeight);
|
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) {
|
if (codecMaxSize != null) {
|
||||||
maxWidth = max(maxWidth, codecMaxSize.x);
|
maxWidth = max(maxWidth, codecMaxSize.x);
|
||||||
maxHeight = max(maxHeight, codecMaxSize.y);
|
maxHeight = max(maxHeight, codecMaxSize.y);
|
||||||
@ -1600,8 +1600,10 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
|
|||||||
*
|
*
|
||||||
* @param codecInfo Information about the {@link MediaCodec} being configured.
|
* @param codecInfo Information about the {@link MediaCodec} being configured.
|
||||||
* @param format The {@link Format} for which the codec is 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) {
|
private static Point getCodecMaxSize(MediaCodecInfo codecInfo, Format format) {
|
||||||
boolean isVerticalVideo = format.height > format.width;
|
boolean isVerticalVideo = format.height > format.width;
|
||||||
int formatLongEdgePx = isVerticalVideo ? format.height : format.width;
|
int formatLongEdgePx = isVerticalVideo ? format.height : format.width;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user