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
42a7083b
authored
Aug 03, 2020
by
olly
Committed by
kim-vde
Aug 07, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
FragmentedMp4Extractor: Fix clearHeaderSize handling
PiperOrigin-RevId: 324560994
parent
a04769f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java
View file @
42a7083b
...
...
@@ -1753,14 +1753,13 @@ public class FragmentedMp4Extractor implements Extractor {
// We need to account for the additional clear header by adding clearHeaderSize to
// clearDataSize for the first subsample specified in the subsample encryption data.
scratch
.
reset
(
subsampleDataLength
);
scratch
.
readBytes
(
subsampleEncryptionData
.
getData
(),
/* offset= */
0
,
subsampleDataLength
);
subsampleEncryptionData
.
skipBytes
(
subsampleDataLength
);
byte
[]
scratchData
=
scratch
.
getData
(
);
subsampleEncryptionData
.
readBytes
(
scratchData
,
/* offset= */
0
,
subsampleDataLength
);
byte
[]
data
=
scratch
.
getData
();
int
clearDataSize
=
(
data
[
2
]
&
0xFF
)
<<
8
|
(
data
[
3
]
&
0xFF
);
int
clearDataSize
=
(
scratchData
[
2
]
&
0xFF
)
<<
8
|
(
scratchData
[
3
]
&
0xFF
);
int
adjustedClearDataSize
=
clearDataSize
+
clearHeaderSize
;
d
ata
[
2
]
=
(
byte
)
((
adjustedClearDataSize
>>
8
)
&
0xFF
);
d
ata
[
3
]
=
(
byte
)
(
adjustedClearDataSize
&
0xFF
);
scratchD
ata
[
2
]
=
(
byte
)
((
adjustedClearDataSize
>>
8
)
&
0xFF
);
scratchD
ata
[
3
]
=
(
byte
)
(
adjustedClearDataSize
&
0xFF
);
subsampleEncryptionData
=
scratch
;
}
...
...
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