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
d256ed78
Commit
d256ed78
authored
May 03, 2014
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4xm: allocate extradata properly.
Pad it with the required amount of zeros, check for malloc failure.
parent
fd056029
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
4xm.c
libavformat/4xm.c
+4
-1
No files found.
libavformat/4xm.c
View file @
d256ed78
...
...
@@ -110,8 +110,11 @@ static int parse_vtrk(AVFormatContext *s,
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_VIDEO
;
st
->
codec
->
codec_id
=
AV_CODEC_ID_4XM
;
st
->
codec
->
extradata
=
av_mallocz
(
4
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
!
st
->
codec
->
extradata
)
return
AVERROR
(
ENOMEM
);
st
->
codec
->
extradata_size
=
4
;
st
->
codec
->
extradata
=
av_malloc
(
4
);
AV_WL32
(
st
->
codec
->
extradata
,
AV_RL32
(
buf
+
16
));
st
->
codec
->
width
=
AV_RL32
(
buf
+
36
);
st
->
codec
->
height
=
AV_RL32
(
buf
+
40
);
...
...
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