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
6046e929
authored
Oct 08, 2019
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Merge pull request #6502 from caiiiyua:bug_default_dash_chunk_source_wrong_segmentnumshift
PiperOrigin-RevId: 273549830
parent
0249058c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java
View file @
6046e929
...
@@ -686,7 +686,9 @@ public class DefaultDashChunkSource implements DashChunkSource {
...
@@ -686,7 +686,9 @@ public class DefaultDashChunkSource implements DashChunkSource {
newPeriodDurationUs
,
newRepresentation
,
extractorWrapper
,
segmentNumShift
,
newIndex
);
newPeriodDurationUs
,
newRepresentation
,
extractorWrapper
,
segmentNumShift
,
newIndex
);
}
}
long
oldIndexLastSegmentNum
=
oldIndex
.
getFirstSegmentNum
()
+
oldIndexSegmentCount
-
1
;
long
oldIndexFirstSegmentNum
=
oldIndex
.
getFirstSegmentNum
();
long
oldIndexStartTimeUs
=
oldIndex
.
getTimeUs
(
oldIndexFirstSegmentNum
);
long
oldIndexLastSegmentNum
=
oldIndexFirstSegmentNum
+
oldIndexSegmentCount
-
1
;
long
oldIndexEndTimeUs
=
long
oldIndexEndTimeUs
=
oldIndex
.
getTimeUs
(
oldIndexLastSegmentNum
)
oldIndex
.
getTimeUs
(
oldIndexLastSegmentNum
)
+
oldIndex
.
getDurationUs
(
oldIndexLastSegmentNum
,
newPeriodDurationUs
);
+
oldIndex
.
getDurationUs
(
oldIndexLastSegmentNum
,
newPeriodDurationUs
);
...
@@ -700,8 +702,14 @@ public class DefaultDashChunkSource implements DashChunkSource {
...
@@ -700,8 +702,14 @@ public class DefaultDashChunkSource implements DashChunkSource {
// There's a gap between the old index and the new one which means we've slipped behind the
// There's a gap between the old index and the new one which means we've slipped behind the
// live window and can't proceed.
// live window and can't proceed.
throw
new
BehindLiveWindowException
();
throw
new
BehindLiveWindowException
();
}
else
if
(
newIndexStartTimeUs
<
oldIndexStartTimeUs
)
{
// The new index overlaps with (but does not have a start position contained within) the old
// index. This can only happen if extra segments have been added to the start of the index.
newSegmentNumShift
-=
newIndex
.
getSegmentNum
(
oldIndexStartTimeUs
,
newPeriodDurationUs
)
-
oldIndexFirstSegmentNum
;
}
else
{
}
else
{
// The new index overlaps with
the old one
.
// The new index overlaps with
(and has a start position contained within) the old index
.
newSegmentNumShift
+=
newSegmentNumShift
+=
oldIndex
.
getSegmentNum
(
newIndexStartTimeUs
,
newPeriodDurationUs
)
oldIndex
.
getSegmentNum
(
newIndexStartTimeUs
,
newPeriodDurationUs
)
-
newIndexFirstSegmentNum
;
-
newIndexFirstSegmentNum
;
...
...
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