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
fef2f472
Commit
fef2f472
authored
May 31, 2015
by
Vittorio Giovara
Committed by
Luca Barbato
May 31, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xvid: Check memory allocation
parent
9fb483fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
libxvid.c
libavcodec/libxvid.c
+6
-0
No files found.
libavcodec/libxvid.c
View file @
fef2f472
...
...
@@ -276,6 +276,8 @@ static int xvid_strip_vol_header(AVCodecContext *avctx, AVPacket *pkt,
/* We need to store the header, so extract it */
if
(
!
avctx
->
extradata
)
{
avctx
->
extradata
=
av_malloc
(
vo_len
);
if
(
!
avctx
->
extradata
)
return
AVERROR
(
ENOMEM
);
memcpy
(
avctx
->
extradata
,
pkt
->
data
,
vo_len
);
avctx
->
extradata_size
=
vo_len
;
}
...
...
@@ -594,11 +596,15 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx)
if
(
avctx
->
intra_matrix
)
{
intra
=
avctx
->
intra_matrix
;
x
->
intra_matrix
=
av_malloc
(
sizeof
(
unsigned
char
)
*
64
);
if
(
!
x
->
intra_matrix
)
return
AVERROR
(
ENOMEM
);
}
else
intra
=
NULL
;
if
(
avctx
->
inter_matrix
)
{
inter
=
avctx
->
inter_matrix
;
x
->
inter_matrix
=
av_malloc
(
sizeof
(
unsigned
char
)
*
64
);
if
(
!
x
->
inter_matrix
)
return
AVERROR
(
ENOMEM
);
}
else
inter
=
NULL
;
...
...
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