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
f16a6f66
Commit
f16a6f66
authored
Apr 12, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/ocv: fix crash with no dilate arguments.
parent
490786c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
vf_libopencv.c
libavfilter/vf_libopencv.c
+7
-6
No files found.
libavfilter/vf_libopencv.c
View file @
f16a6f66
...
@@ -261,17 +261,18 @@ static av_cold int dilate_init(AVFilterContext *ctx, const char *args)
...
@@ -261,17 +261,18 @@ static av_cold int dilate_init(AVFilterContext *ctx, const char *args)
const
char
*
buf
=
args
;
const
char
*
buf
=
args
;
int
ret
;
int
ret
;
dilate
->
nb_iterations
=
1
;
if
(
args
)
if
(
args
)
kernel_str
=
av_get_token
(
&
buf
,
"|"
);
kernel_str
=
av_get_token
(
&
buf
,
"|"
);
if
((
ret
=
parse_iplconvkernel
(
&
dilate
->
kernel
,
else
*
kernel_str
?
kernel_str
:
default_kernel_str
,
kernel_str
=
av_strdup
(
default_kernel_str
);
ctx
))
<
0
)
if
(
!
kernel_str
)
return
AVERROR
(
ENOMEM
);
if
((
ret
=
parse_iplconvkernel
(
&
dilate
->
kernel
,
kernel_str
,
ctx
))
<
0
)
return
ret
;
return
ret
;
av_free
(
kernel_str
);
av_free
(
kernel_str
);
sscanf
(
buf
,
"|%d"
,
&
dilate
->
nb_iterations
);
if
(
!
buf
||
sscanf
(
buf
,
"|%d"
,
&
dilate
->
nb_iterations
)
!=
1
)
dilate
->
nb_iterations
=
1
;
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"iterations_nb:%d
\n
"
,
dilate
->
nb_iterations
);
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"iterations_nb:%d
\n
"
,
dilate
->
nb_iterations
);
if
(
dilate
->
nb_iterations
<=
0
)
{
if
(
dilate
->
nb_iterations
<=
0
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Invalid non-positive value '%d' for nb_iterations
\n
"
,
av_log
(
ctx
,
AV_LOG_ERROR
,
"Invalid non-positive value '%d' for nb_iterations
\n
"
,
...
...
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