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
11e4890e
Commit
11e4890e
authored
Jul 06, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/unsharp_opencl: use av_mallocz_array()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
a53c5d45
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
unsharp_opencl.c
libavfilter/unsharp_opencl.c
+3
-3
No files found.
libavfilter/unsharp_opencl.c
View file @
11e4890e
...
...
@@ -54,7 +54,7 @@ static int compute_mask(int step, uint32_t *mask)
ret
=
AVERROR
(
ENOMEM
);
goto
end
;
}
counter
=
av_mallocz
(
sizeof
(
uint32_t
*
)
*
(
2
*
step
+
1
));
counter
=
av_mallocz
_array
(
2
*
step
+
1
,
sizeof
(
uint32_t
*
));
if
(
!
counter
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
end
;
...
...
@@ -92,12 +92,12 @@ static int compute_mask_matrix(cl_mem cl_mask_matrix, int step_x, int step_y)
int
i
,
j
,
ret
=
0
;
uint32_t
*
mask_matrix
,
*
mask_x
,
*
mask_y
;
size_t
size_matrix
=
sizeof
(
uint32_t
)
*
(
2
*
step_x
+
1
)
*
(
2
*
step_y
+
1
);
mask_x
=
av_mallocz
(
sizeof
(
uint32_t
)
*
(
2
*
step_x
+
1
));
mask_x
=
av_mallocz
_array
(
2
*
step_x
+
1
,
sizeof
(
uint32_t
));
if
(
!
mask_x
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
end
;
}
mask_y
=
av_mallocz
(
sizeof
(
uint32_t
)
*
(
2
*
step_y
+
1
));
mask_y
=
av_mallocz
_array
(
2
*
step_y
+
1
,
sizeof
(
uint32_t
));
if
(
!
mask_y
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
end
;
...
...
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