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
83797da6
Commit
83797da6
authored
May 31, 2015
by
Vittorio Giovara
Committed by
Luca Barbato
May 31, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wma: Check memory allocation
parent
e1ea365f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
wmaenc.c
libavcodec/wmaenc.c
+4
-0
No files found.
libavcodec/wmaenc.c
View file @
83797da6
...
...
@@ -62,11 +62,15 @@ static av_cold int encode_init(AVCodecContext *avctx)
flags2
=
1
;
if
(
avctx
->
codec
->
id
==
AV_CODEC_ID_WMAV1
)
{
extradata
=
av_malloc
(
4
);
if
(
!
extradata
)
return
AVERROR
(
ENOMEM
);
avctx
->
extradata_size
=
4
;
AV_WL16
(
extradata
,
flags1
);
AV_WL16
(
extradata
+
2
,
flags2
);
}
else
if
(
avctx
->
codec
->
id
==
AV_CODEC_ID_WMAV2
)
{
extradata
=
av_mallocz
(
10
);
if
(
!
extradata
)
return
AVERROR
(
ENOMEM
);
avctx
->
extradata_size
=
10
;
AV_WL32
(
extradata
,
flags1
);
AV_WL16
(
extradata
+
4
,
flags2
);
...
...
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