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
896f63a3
authored
Apr 14, 2017
by
Rohit Krishnan
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fixes OOM that can occur from reading first NAL packet before sequence header
parent
f36500c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
library/core/src/main/java/com/google/android/exoplayer2/extractor/flv/VideoTagPayloadReader.java
library/core/src/main/java/com/google/android/exoplayer2/extractor/flv/VideoTagPayloadReader.java
View file @
896f63a3
...
...
@@ -93,7 +93,7 @@ import com.google.android.exoplayer2.video.AvcConfig;
avcConfig
.
initializationData
,
Format
.
NO_VALUE
,
avcConfig
.
pixelWidthAspectRatio
,
null
);
output
.
format
(
format
);
hasOutputFormat
=
true
;
}
else
if
(
packetType
==
AVC_PACKET_TYPE_AVC_NALU
)
{
}
else
if
(
packetType
==
AVC_PACKET_TYPE_AVC_NALU
&&
hasOutputFormat
)
{
// TODO: Deduplicate with Mp4Extractor.
// Zero the top three bytes of the array that we'll use to decode nal unit lengths, in case
// they're only 1 or 2 bytes long.
...
...
@@ -101,6 +101,7 @@ import com.google.android.exoplayer2.video.AvcConfig;
nalLengthData
[
0
]
=
0
;
nalLengthData
[
1
]
=
0
;
nalLengthData
[
2
]
=
0
;
if
(
nalUnitLengthFieldLength
==
0
)
nalUnitLengthFieldLength
=
4
;
int
nalUnitLengthFieldLengthDiff
=
4
-
nalUnitLengthFieldLength
;
// NAL units are length delimited, but the decoder requires start code delimited units.
// Loop until we've written the sample to the track output, replacing length delimiters with
...
...
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