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
6b4c48a3
authored
Feb 21, 2019
by
aquilescanta
Committed by
Andrew Lewis
Feb 21, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Replace initLoadCompleted with initDataLoadRequired
PiperOrigin-RevId: 234966936
parent
253ea786
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaChunk.java
library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaChunk.java
View file @
6b4c48a3
...
...
@@ -205,7 +205,7 @@ import java.util.concurrent.atomic.AtomicInteger;
private
HlsSampleStreamWrapper
output
;
private
int
initSegmentBytesLoaded
;
private
int
nextLoadPosition
;
private
boolean
init
LoadComplet
ed
;
private
boolean
init
DataLoadRequir
ed
;
private
volatile
boolean
loadCanceled
;
private
boolean
loadCompleted
;
...
...
@@ -258,6 +258,7 @@ import java.util.concurrent.atomic.AtomicInteger;
this
.
id3Decoder
=
id3Decoder
;
this
.
scratchId3Data
=
scratchId3Data
;
this
.
shouldSpliceIn
=
shouldSpliceIn
;
initDataLoadRequired
=
initDataSpec
!=
null
;
uid
=
uidSource
.
getAndIncrement
();
}
...
...
@@ -288,7 +289,7 @@ import java.util.concurrent.atomic.AtomicInteger;
if
(
extractor
==
null
&&
previousExtractor
!=
null
)
{
extractor
=
previousExtractor
;
isExtractorReusable
=
true
;
init
LoadCompleted
=
initDataSpec
!=
null
;
init
DataLoadRequired
=
false
;
output
.
init
(
uid
,
shouldSpliceIn
,
/* reusingExtractor= */
true
);
}
maybeLoadInitData
();
...
...
@@ -303,8 +304,7 @@ import java.util.concurrent.atomic.AtomicInteger;
// Internal methods.
private
void
maybeLoadInitData
()
throws
IOException
,
InterruptedException
{
if
(
initLoadCompleted
||
initDataSpec
==
null
)
{
// Note: The HLS spec forbids initialization segments for packed audio.
if
(!
initDataLoadRequired
)
{
return
;
}
DataSpec
initSegmentDataSpec
;
...
...
@@ -332,7 +332,7 @@ import java.util.concurrent.atomic.AtomicInteger;
}
finally
{
Util
.
closeQuietly
(
initDataSource
);
}
init
LoadCompleted
=
tru
e
;
init
DataLoadRequired
=
fals
e
;
}
private
void
loadMedia
()
throws
IOException
,
InterruptedException
{
...
...
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