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
34ef9b20
authored
Sep 26, 2020
by
Will
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add tests for the FlvExtractor seek map. Fix an EOF seeking issue.
parent
1b215736
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
0 deletions
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/flv/FlvExtractor.java
library/extractor/src/test/java/com/google/android/exoplayer2/extractor/flv/SeekMapTest.java
testdata/src/test/assets/media/flv/sample-with-metadata.flv
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/flv/FlvExtractor.java
View file @
34ef9b20
...
...
@@ -322,6 +322,10 @@ public final class FlvExtractor implements Extractor {
return
new
SeekMap
.
Unseekable
(
durationUs
);
}
int
keyFrameSize
=
times
.
size
();
if
((
long
)
(
times
.
get
(
times
.
size
()
-
1
)
*
C
.
MICROS_PER_SECOND
)
==
durationUs
)
{
// the last keyframe has no sample data followed (AVC_PACKET_TYPE_END_OF_SEQUENCE)
keyFrameSize
=
keyFrameSize
-
1
;
}
int
[]
sizes
=
new
int
[
keyFrameSize
];
long
[]
offsets
=
new
long
[
keyFrameSize
];
long
[]
durationsUs
=
new
long
[
keyFrameSize
];
...
...
library/extractor/src/test/java/com/google/android/exoplayer2/extractor/flv/SeekMapTest.java
0 → 100644
View file @
34ef9b20
This diff is collapsed.
Click to expand it.
testdata/src/test/assets/media/flv/sample-with-metadata.flv
0 → 100644
View file @
34ef9b20
No preview for this file type
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