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
699fee97
authored
Nov 28, 2018
by
andrewlewis
Committed by
Andrew Lewis
Nov 29, 2018
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Replace remaining stbl assertions with warnings
Issue: #5162 PiperOrigin-RevId: 223193019
parent
f45943b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
15 deletions
RELEASENOTES.md
library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java
RELEASENOTES.md
View file @
699fee97
...
@@ -31,6 +31,9 @@
...
@@ -31,6 +31,9 @@
(
[
#5139
](
https://github.com/google/ExoPlayer/issues/5139
)
).
(
[
#5139
](
https://github.com/google/ExoPlayer/issues/5139
)
).
*
Fix issue where null
`Metadata`
was output when it failed to decode
*
Fix issue where null
`Metadata`
was output when it failed to decode
(
[
#5149
](
https://github.com/google/ExoPlayer/issues/5149
)
).
(
[
#5149
](
https://github.com/google/ExoPlayer/issues/5149
)
).
*
Fix playback of some invalid but playable MP4 streams by replacing assertions
with logged warnings in sample table parsing code
(
[
#5162
](
https://github.com/google/ExoPlayer/issues/5162
)
).
### 2.9.1 ###
### 2.9.1 ###
...
...
library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java
View file @
699fee97
...
@@ -236,8 +236,6 @@ import java.util.List;
...
@@ -236,8 +236,6 @@ import java.util.List;
sizes
=
Arrays
.
copyOf
(
sizes
,
sampleCount
);
sizes
=
Arrays
.
copyOf
(
sizes
,
sampleCount
);
timestamps
=
Arrays
.
copyOf
(
timestamps
,
sampleCount
);
timestamps
=
Arrays
.
copyOf
(
timestamps
,
sampleCount
);
flags
=
Arrays
.
copyOf
(
flags
,
sampleCount
);
flags
=
Arrays
.
copyOf
(
flags
,
sampleCount
);
remainingSamplesAtTimestampOffset
=
0
;
remainingTimestampOffsetChanges
=
0
;
break
;
break
;
}
}
...
@@ -293,23 +291,38 @@ import java.util.List;
...
@@ -293,23 +291,38 @@ import java.util.List;
}
}
duration
=
timestampTimeUnits
+
timestampOffset
;
duration
=
timestampTimeUnits
+
timestampOffset
;
Assertions
.
checkArgument
(
remainingSamplesAtTimestampOffset
==
0
);
// If the stbl's child boxes are not consistent the container is malformed, but the stream may
// Remove trailing ctts entries with 0-valued sample counts.
// still be playable.
boolean
isCttsValid
=
true
;
while
(
remainingTimestampOffsetChanges
>
0
)
{
while
(
remainingTimestampOffsetChanges
>
0
)
{
Assertions
.
checkArgument
(
ctts
.
readUnsignedIntToInt
()
==
0
);
if
(
ctts
.
readUnsignedIntToInt
()
!=
0
)
{
isCttsValid
=
false
;
break
;
}
ctts
.
readInt
();
// Ignore offset.
ctts
.
readInt
();
// Ignore offset.
remainingTimestampOffsetChanges
--;
remainingTimestampOffsetChanges
--;
}
}
if
(
remainingSynchronizationSamples
!=
0
// If the stbl's child boxes are not consistent the container is malformed, but the stream may
||
remainingSamplesAtTimestampDelta
!=
0
// still be playable.
||
remainingSamplesInChunk
!=
0
if
(
remainingSynchronizationSamples
!=
0
||
remainingSamplesAtTimestampDelta
!=
0
||
remainingTimestampDeltaChanges
!=
0
||
remainingSamplesInChunk
!=
0
||
remainingTimestampDeltaChanges
!=
0
)
{
||
remainingSamplesAtTimestampOffset
!=
0
Log
.
w
(
TAG
,
"Inconsistent stbl box for track "
+
track
.
id
||
!
isCttsValid
)
{
+
": remainingSynchronizationSamples "
+
remainingSynchronizationSamples
Log
.
w
(
+
", remainingSamplesAtTimestampDelta "
+
remainingSamplesAtTimestampDelta
TAG
,
+
", remainingSamplesInChunk "
+
remainingSamplesInChunk
"Inconsistent stbl box for track "
+
", remainingTimestampDeltaChanges "
+
remainingTimestampDeltaChanges
);
+
track
.
id
+
": remainingSynchronizationSamples "
+
remainingSynchronizationSamples
+
", remainingSamplesAtTimestampDelta "
+
remainingSamplesAtTimestampDelta
+
", remainingSamplesInChunk "
+
remainingSamplesInChunk
+
", remainingTimestampDeltaChanges "
+
remainingTimestampDeltaChanges
+
", remainingSamplesAtTimestampOffset "
+
remainingSamplesAtTimestampOffset
+
(!
isCttsValid
?
", ctts invalid"
:
""
));
}
}
}
else
{
}
else
{
long
[]
chunkOffsetsBytes
=
new
long
[
chunkIterator
.
length
];
long
[]
chunkOffsetsBytes
=
new
long
[
chunkIterator
.
length
];
...
...
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