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
a2542188
authored
Dec 08, 2014
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
No-op format changes.
parent
87ca1b34
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
library/src/main/java/com/google/android/exoplayer/hls/TsExtractor.java
library/src/main/java/com/google/android/exoplayer/hls/TsExtractor.java
View file @
a2542188
...
...
@@ -787,18 +787,16 @@ public final class TsExtractor {
}
int
spsLength
=
bitArray
.
findNextNalUnit
(-
1
,
spsOffset
+
3
)
-
spsOffset
;
int
ppsLength
=
bitArray
.
findNextNalUnit
(-
1
,
ppsOffset
+
3
)
-
ppsOffset
;
byte
[]
spsData
=
new
byte
[
spsLength
];
byte
[]
ppsData
=
new
byte
[
ppsLength
];
System
.
arraycopy
(
bitArray
.
getData
(),
spsOffset
,
spsData
,
0
,
spsLength
);
System
.
arraycopy
(
bitArray
.
getData
(),
ppsOffset
,
ppsData
,
0
,
ppsLength
);
List
<
byte
[]>
initializationData
=
new
ArrayList
<
byte
[]>();
initializationData
.
add
(
spsData
);
initializationData
.
add
(
ppsData
);
// Unescape the SPS unit.
byte
[]
unescapedSps
=
unescape
Data
(
spsData
,
0
,
spsLength
);
byte
[]
unescapedSps
=
unescape
Stream
(
spsData
,
0
,
spsLength
);
bitArray
.
reset
(
unescapedSps
,
unescapedSps
.
length
);
// Parse the SPS unit
...
...
@@ -913,7 +911,7 @@ public final class TsExtractor {
* <p>
* See ISO/IEC 14496-10:2005(E) page 36 for more information.
*/
private
byte
[]
unescape
Data
(
byte
[]
data
,
int
offset
,
int
limit
)
{
private
byte
[]
unescape
Stream
(
byte
[]
data
,
int
offset
,
int
limit
)
{
int
position
=
offset
;
List
<
Integer
>
escapePositions
=
new
ArrayList
<
Integer
>();
while
(
position
<
limit
)
{
...
...
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