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
5c95de15
Commit
5c95de15
authored
Jan 03, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/libxvid: check for av_malloc*() failures
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
bd12aa2b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
libxvid.c
libavcodec/libxvid.c
+10
-0
No files found.
libavcodec/libxvid.c
View file @
5c95de15
...
...
@@ -287,6 +287,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
;
}
...
...
@@ -625,11 +627,19 @@ 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
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
fail
;
}
}
else
intra
=
NULL
;
if
(
avctx
->
inter_matrix
)
{
inter
=
avctx
->
inter_matrix
;
x
->
inter_matrix
=
av_malloc
(
sizeof
(
unsigned
char
)
*
64
);
if
(
!
x
->
inter_matrix
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
fail
;
}
}
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