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
a8fe9a72
Commit
a8fe9a72
authored
Nov 16, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pthread: add some malloc failure checks
parent
03f30c83
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
pthread.c
libavcodec/pthread.c
+9
-0
No files found.
libavcodec/pthread.c
View file @
a8fe9a72
...
...
@@ -719,6 +719,11 @@ static int frame_thread_init(AVCodecContext *avctx)
p
->
parent
=
fctx
;
p
->
avctx
=
copy
;
if
(
!
copy
)
{
err
=
AVERROR
(
ENOMEM
);
goto
error
;
}
*
copy
=
*
src
;
copy
->
thread_opaque
=
p
;
copy
->
pkt
=
&
p
->
avpkt
;
...
...
@@ -732,6 +737,10 @@ static int frame_thread_init(AVCodecContext *avctx)
update_context_from_thread
(
avctx
,
copy
,
1
);
}
else
{
copy
->
priv_data
=
av_malloc
(
codec
->
priv_data_size
);
if
(
!
copy
->
priv_data
)
{
err
=
AVERROR
(
ENOMEM
);
goto
error
;
}
memcpy
(
copy
->
priv_data
,
src
->
priv_data
,
codec
->
priv_data_size
);
copy
->
internal
=
av_malloc
(
sizeof
(
AVCodecInternal
));
if
(
!
copy
->
internal
)
{
...
...
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