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
79acadcc
authored
Jun 02, 2020
by
aquilescanta
Committed by
Oliver Woodman
Jun 03, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Check for section_syntax_indicator in TS tables
Issue:#7325 PiperOrigin-RevId: 314321914
parent
5e2b89b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/TsExtractor.java
library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/TsExtractor.java
View file @
79acadcc
...
...
@@ -460,10 +460,15 @@ public final class TsExtractor implements Extractor {
// See ISO/IEC 13818-1, section 2.4.4.4 for more information on table id assignment.
return
;
}
// section_syntax_indicator(1), '0'(1), reserved(2), section_length(12),
// transport_stream_id (16), reserved (2), version_number (5), current_next_indicator (1),
// section_number (8), last_section_number (8)
sectionData
.
skipBytes
(
7
);
// section_syntax_indicator(1), '0'(1), reserved(2), section_length(4)
int
secondHeaderByte
=
sectionData
.
readUnsignedByte
();
if
((
secondHeaderByte
&
0x80
)
==
0
)
{
// section_syntax_indicator must be 1. See ISO/IEC 13818-1, section 2.4.4.5.
return
;
}
// section_length(8), transport_stream_id (16), reserved (2), version_number (5),
// current_next_indicator (1), section_number (8), last_section_number (8)
sectionData
.
skipBytes
(
6
);
int
programCount
=
sectionData
.
bytesLeft
()
/
4
;
for
(
int
i
=
0
;
i
<
programCount
;
i
++)
{
...
...
@@ -535,8 +540,14 @@ public final class TsExtractor implements Extractor {
timestampAdjusters
.
add
(
timestampAdjuster
);
}
// section_syntax_indicator(1), '0'(1), reserved(2), section_length(12)
sectionData
.
skipBytes
(
2
);
// section_syntax_indicator(1), '0'(1), reserved(2), section_length(4)
int
secondHeaderByte
=
sectionData
.
readUnsignedByte
();
if
((
secondHeaderByte
&
0x80
)
==
0
)
{
// section_syntax_indicator must be 1. See ISO/IEC 13818-1, section 2.4.4.9.
return
;
}
// section_length(8)
sectionData
.
skipBytes
(
1
);
int
programNumber
=
sectionData
.
readUnsignedShort
();
// Skip 3 bytes (24 bits), including:
...
...
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