Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
752e82df
authored
Jul 07, 2022
by
christosts
Committed by
Rohit Singh
Jul 07, 2022
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add missing Nullable annotation
PiperOrigin-RevId: 459485334
parent
a80dd604
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java
library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java
View file @
752e82df
...
@@ -1569,7 +1569,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
...
@@ -1569,7 +1569,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
);
...
@@ -1597,8 +1597,10 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
...
@@ -1597,8 +1597,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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment