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
dd5eabdf
authored
May 11, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Signal EoS when seeking ExtractorSampleSource to the end of a track.
parent
2ce33c25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
library/src/main/java/com/google/android/exoplayer/extractor/ExtractorSampleSource.java
library/src/main/java/com/google/android/exoplayer/extractor/ExtractorSampleSource.java
View file @
dd5eabdf
...
...
@@ -72,6 +72,7 @@ public class ExtractorSampleSource implements SampleSource, ExtractorOutput, Loa
private
boolean
prepared
;
private
int
enabledTrackCount
;
private
TrackInfo
[]
trackInfos
;
private
long
maxTrackDurationUs
;
private
boolean
[]
pendingMediaFormat
;
private
boolean
[]
pendingDiscontinuities
;
private
boolean
[]
trackEnabledStates
;
...
...
@@ -156,9 +157,13 @@ public class ExtractorSampleSource implements SampleSource, ExtractorOutput, Loa
pendingDiscontinuities
=
new
boolean
[
trackCount
];
pendingMediaFormat
=
new
boolean
[
trackCount
];
trackInfos
=
new
TrackInfo
[
trackCount
];
maxTrackDurationUs
=
C
.
UNKNOWN_TIME_US
;
for
(
int
i
=
0
;
i
<
trackCount
;
i
++)
{
MediaFormat
format
=
sampleQueues
.
valueAt
(
i
).
getFormat
();
trackInfos
[
i
]
=
new
TrackInfo
(
format
.
mimeType
,
format
.
durationUs
);
if
(
format
.
durationUs
!=
C
.
UNKNOWN_TIME_US
&&
format
.
durationUs
>
maxTrackDurationUs
)
{
maxTrackDurationUs
=
format
.
durationUs
;
}
}
prepared
=
true
;
return
true
;
...
...
@@ -448,6 +453,11 @@ public class ExtractorSampleSource implements SampleSource, ExtractorOutput, Loa
loadable
=
createLoadableFromStart
();
}
else
{
Assertions
.
checkState
(
isPendingReset
());
if
(
maxTrackDurationUs
!=
C
.
UNKNOWN_TIME_US
&&
pendingResetPositionUs
>=
maxTrackDurationUs
)
{
loadingFinished
=
true
;
pendingResetPositionUs
=
NO_RESET_PENDING
;
return
;
}
loadable
=
createLoadableFromPositionUs
(
pendingResetPositionUs
);
pendingResetPositionUs
=
NO_RESET_PENDING
;
}
...
...
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