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
2d9c290a
Commit
2d9c290a
authored
Oct 18, 2018
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_lensfun: use av_malloc_array()
parent
0ce7005d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
vf_lensfun.c
libavfilter/vf_lensfun.c
+3
-3
No files found.
libavfilter/vf_lensfun.c
View file @
2d9c290a
...
...
@@ -240,7 +240,7 @@ static int config_props(AVFilterLink *inlink)
if
(
!
lensfun
->
distortion_coords
)
{
if
(
lensfun
->
mode
&
SUBPIXEL_DISTORTION
)
{
lensfun
->
distortion_coords
=
av_malloc
(
sizeof
(
float
)
*
inlink
->
w
*
inlink
->
h
*
2
*
3
);
lensfun
->
distortion_coords
=
av_malloc
_array
(
inlink
->
w
*
inlink
->
h
,
sizeof
(
float
)
*
2
*
3
);
if
(
!
lensfun
->
distortion_coords
)
return
AVERROR
(
ENOMEM
);
if
(
lensfun
->
mode
&
GEOMETRY_DISTORTION
)
{
...
...
@@ -257,7 +257,7 @@ static int config_props(AVFilterLink *inlink)
lensfun
->
distortion_coords
);
}
}
else
if
(
lensfun
->
mode
&
GEOMETRY_DISTORTION
)
{
lensfun
->
distortion_coords
=
av_malloc
(
sizeof
(
float
)
*
inlink
->
w
*
inlink
->
h
*
2
);
lensfun
->
distortion_coords
=
av_malloc
_array
(
inlink
->
w
*
inlink
->
h
,
sizeof
(
float
)
*
2
);
if
(
!
lensfun
->
distortion_coords
)
return
AVERROR
(
ENOMEM
);
// apply only geometry distortion
...
...
@@ -270,7 +270,7 @@ static int config_props(AVFilterLink *inlink)
if
(
!
lensfun
->
interpolation
)
if
(
lensfun
->
interpolation_type
==
LANCZOS
)
{
lensfun
->
interpolation
=
av_malloc
(
sizeof
(
float
)
*
4
*
LANCZOS_RESOLUTION
);
lensfun
->
interpolation
=
av_malloc
_array
(
LANCZOS_RESOLUTION
,
sizeof
(
float
)
*
4
);
if
(
!
lensfun
->
interpolation
)
return
AVERROR
(
ENOMEM
);
for
(
index
=
0
;
index
<
4
*
LANCZOS_RESOLUTION
;
++
index
)
{
...
...
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