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
4ccfa6f0
authored
Dec 20, 2018
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix buffer size for renderers with TRACK_TYPE_NONE
This includes NoSampleRenderers.
parent
6060b811
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
library/core/src/main/java/com/google/android/exoplayer2/util/Util.java
library/core/src/main/java/com/google/android/exoplayer2/util/Util.java
View file @
4ccfa6f0
...
...
@@ -1436,11 +1436,12 @@ public final class Util {
}
/**
* Maps a {@link C} {@code TRACK_TYPE_*} constant to the corresponding {@link C}
*
{@code
DEFAULT_*_BUFFER_SIZE} constant.
* Maps a {@link C} {@code TRACK_TYPE_*} constant to the corresponding {@link C}
{@code
* DEFAULT_*_BUFFER_SIZE} constant.
*
* @param trackType The track type.
* @return The corresponding default buffer size in bytes.
* @throws IllegalArgumentException If the track type is an unrecognized or custom track type.
*/
public
static
int
getDefaultBufferSize
(
int
trackType
)
{
switch
(
trackType
)
{
...
...
@@ -1456,8 +1457,10 @@ public final class Util {
return
C
.
DEFAULT_METADATA_BUFFER_SIZE
;
case
C
.
TRACK_TYPE_CAMERA_MOTION
:
return
C
.
DEFAULT_CAMERA_MOTION_BUFFER_SIZE
;
case
C
.
TRACK_TYPE_NONE
:
return
0
;
default
:
throw
new
Illegal
State
Exception
();
throw
new
Illegal
Argument
Exception
();
}
}
...
...
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