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
d9ddbaa9
Commit
d9ddbaa9
authored
Jul 19, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/avfilter: use av_malloc(z)_array()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
d13a731f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
avfilter.c
libavfilter/avfilter.c
+4
-4
No files found.
libavfilter/avfilter.c
View file @
d9ddbaa9
...
...
@@ -627,22 +627,22 @@ AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name)
ret
->
nb_inputs
=
avfilter_pad_count
(
filter
->
inputs
);
if
(
ret
->
nb_inputs
)
{
ret
->
input_pads
=
av_malloc
(
sizeof
(
AVFilterPad
)
*
ret
->
nb_inputs
);
ret
->
input_pads
=
av_malloc
_array
(
ret
->
nb_inputs
,
sizeof
(
AVFilterPad
)
);
if
(
!
ret
->
input_pads
)
goto
err
;
memcpy
(
ret
->
input_pads
,
filter
->
inputs
,
sizeof
(
AVFilterPad
)
*
ret
->
nb_inputs
);
ret
->
inputs
=
av_mallocz
(
sizeof
(
AVFilterLink
*
)
*
ret
->
nb_inputs
);
ret
->
inputs
=
av_mallocz
_array
(
ret
->
nb_inputs
,
sizeof
(
AVFilterLink
*
)
);
if
(
!
ret
->
inputs
)
goto
err
;
}
ret
->
nb_outputs
=
avfilter_pad_count
(
filter
->
outputs
);
if
(
ret
->
nb_outputs
)
{
ret
->
output_pads
=
av_malloc
(
sizeof
(
AVFilterPad
)
*
ret
->
nb_outputs
);
ret
->
output_pads
=
av_malloc
_array
(
ret
->
nb_outputs
,
sizeof
(
AVFilterPad
)
);
if
(
!
ret
->
output_pads
)
goto
err
;
memcpy
(
ret
->
output_pads
,
filter
->
outputs
,
sizeof
(
AVFilterPad
)
*
ret
->
nb_outputs
);
ret
->
outputs
=
av_mallocz
(
sizeof
(
AVFilterLink
*
)
*
ret
->
nb_outputs
);
ret
->
outputs
=
av_mallocz
_array
(
ret
->
nb_outputs
,
sizeof
(
AVFilterLink
*
)
);
if
(
!
ret
->
outputs
)
goto
err
;
}
...
...
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