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
b0abda43
authored
May 11, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Ensure we configure a new extractor when we need one.
Issue: #400
parent
770ad7f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
library/src/main/java/com/google/android/exoplayer/hls/HlsChunkSource.java
library/src/main/java/com/google/android/exoplayer/hls/HlsChunkSource.java
View file @
b0abda43
...
@@ -243,16 +243,14 @@ public class HlsChunkSource {
...
@@ -243,16 +243,14 @@ public class HlsChunkSource {
public
Chunk
getChunkOperation
(
TsChunk
previousTsChunk
,
long
seekPositionUs
,
public
Chunk
getChunkOperation
(
TsChunk
previousTsChunk
,
long
seekPositionUs
,
long
playbackPositionUs
)
{
long
playbackPositionUs
)
{
int
nextFormatIndex
;
int
nextFormatIndex
;
boolean
switchingVariant
;
boolean
switchingVariantSpliced
;
boolean
switchingVariantSpliced
;
if
(
adaptiveMode
==
ADAPTIVE_MODE_NONE
)
{
if
(
adaptiveMode
==
ADAPTIVE_MODE_NONE
)
{
nextFormatIndex
=
formatIndex
;
nextFormatIndex
=
formatIndex
;
switchingVariant
=
false
;
switchingVariantSpliced
=
false
;
switchingVariantSpliced
=
false
;
}
else
{
}
else
{
nextFormatIndex
=
getNextFormatIndex
(
previousTsChunk
,
playbackPositionUs
);
nextFormatIndex
=
getNextFormatIndex
(
previousTsChunk
,
playbackPositionUs
);
switchingVariant
=
nextFormatIndex
!=
formatIndex
;
switchingVariant
Spliced
=
nextFormatIndex
!=
formatIndex
switchingVariantSpliced
=
switchingVariant
&&
adaptiveMode
==
ADAPTIVE_MODE_SPLICE
;
&&
adaptiveMode
==
ADAPTIVE_MODE_SPLICE
;
}
}
int
variantIndex
=
getVariantIndex
(
enabledFormats
[
nextFormatIndex
]);
int
variantIndex
=
getVariantIndex
(
enabledFormats
[
nextFormatIndex
]);
...
@@ -339,7 +337,8 @@ public class HlsChunkSource {
...
@@ -339,7 +337,8 @@ public class HlsChunkSource {
// Configure the extractor that will read the chunk.
// Configure the extractor that will read the chunk.
HlsExtractorWrapper
extractorWrapper
;
HlsExtractorWrapper
extractorWrapper
;
if
(
previousTsChunk
==
null
||
segment
.
discontinuity
||
switchingVariant
||
liveDiscontinuity
)
{
if
(
previousTsChunk
==
null
||
segment
.
discontinuity
||
!
format
.
equals
(
previousTsChunk
.
format
)
||
liveDiscontinuity
)
{
Extractor
extractor
=
chunkUri
.
getLastPathSegment
().
endsWith
(
AAC_FILE_EXTENSION
)
Extractor
extractor
=
chunkUri
.
getLastPathSegment
().
endsWith
(
AAC_FILE_EXTENSION
)
?
new
AdtsExtractor
(
startTimeUs
)
?
new
AdtsExtractor
(
startTimeUs
)
:
new
TsExtractor
(
startTimeUs
,
audioCapabilities
);
:
new
TsExtractor
(
startTimeUs
,
audioCapabilities
);
...
...
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