Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
ae7df68e
Commit
ae7df68e
authored
Nov 24, 2017
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/avc: return an error in ff_isom_write_avcc if the buffer lenght is too small
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
8c2b37e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
avc.c
libavformat/avc.c
+3
-2
No files found.
libavformat/avc.c
View file @
ae7df68e
...
...
@@ -105,7 +105,9 @@ int ff_avc_parse_nal_units_buf(const uint8_t *buf_in, uint8_t **buf, int *size)
int
ff_isom_write_avcc
(
AVIOContext
*
pb
,
const
uint8_t
*
data
,
int
len
)
{
if
(
len
>
6
)
{
if
(
len
<=
6
)
return
AVERROR_INVALIDDATA
;
/* check for H.264 start code */
if
(
AV_RB32
(
data
)
==
0x00000001
||
AV_RB24
(
data
)
==
0x000001
)
{
...
...
@@ -157,7 +159,6 @@ int ff_isom_write_avcc(AVIOContext *pb, const uint8_t *data, int len)
}
else
{
avio_write
(
pb
,
data
,
len
);
}
}
return
0
;
}
...
...
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