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
4940f21d
authored
Sep 13, 2021
by
olly
Committed by
Christos Tsilopoulos
Sep 14, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Make position-out-of-range errors non-retryable
PiperOrigin-RevId: 396354920
parent
469c0e75
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/upstream/DefaultLoadErrorHandlingPolicy.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultLoadErrorHandlingPolicy.java
View file @
4940f21d
...
...
@@ -101,8 +101,9 @@ public class DefaultLoadErrorHandlingPolicy implements LoadErrorHandlingPolicy {
/**
* Retries for any exception that is not a subclass of {@link ParserException}, {@link
* FileNotFoundException}, {@link CleartextNotPermittedException} or {@link
* UnexpectedLoaderException}. The retry delay is calculated as {@code Math.min((errorCount - 1) *
* 1000, 5000)}.
* UnexpectedLoaderException}, and for which {@link
* DataSourceException#isCausedByPositionOutOfRange} returns {@code false}. The retry delay is
* calculated as {@code Math.min((errorCount - 1) * 1000, 5000)}.
*/
@Override
public
long
getRetryDelayMsFor
(
LoadErrorInfo
loadErrorInfo
)
{
...
...
@@ -111,6 +112,7 @@ public class DefaultLoadErrorHandlingPolicy implements LoadErrorHandlingPolicy {
||
exception
instanceof
FileNotFoundException
||
exception
instanceof
CleartextNotPermittedException
||
exception
instanceof
UnexpectedLoaderException
||
DataSourceException
.
isCausedByPositionOutOfRange
(
exception
)
?
C
.
TIME_UNSET
:
min
((
loadErrorInfo
.
errorCount
-
1
)
*
1000
,
5000
);
}
...
...
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