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
29c663d5
Commit
29c663d5
authored
Mar 26, 2018
by
drfer3
Committed by
Mark Thompson
Mar 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_avgblur_opencl: fix error when clSetKernelArg fails
Fixes Coverity CID 1430382.
parent
213839ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
vf_avgblur_opencl.c
libavfilter/vf_avgblur_opencl.c
+6
-0
No files found.
libavfilter/vf_avgblur_opencl.c
View file @
29c663d5
...
@@ -155,18 +155,21 @@ static int avgblur_opencl_filter_frame(AVFilterLink *inlink, AVFrame *input)
...
@@ -155,18 +155,21 @@ static int avgblur_opencl_filter_frame(AVFilterLink *inlink, AVFrame *input)
if
(
cle
!=
CL_SUCCESS
)
{
if
(
cle
!=
CL_SUCCESS
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to set kernel "
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to set kernel "
"destination image argument: %d.
\n
"
,
cle
);
"destination image argument: %d.
\n
"
,
cle
);
err
=
AVERROR_UNKNOWN
;
goto
fail
;
goto
fail
;
}
}
cle
=
clSetKernelArg
(
ctx
->
kernel_horiz
,
1
,
sizeof
(
cl_mem
),
&
src
);
cle
=
clSetKernelArg
(
ctx
->
kernel_horiz
,
1
,
sizeof
(
cl_mem
),
&
src
);
if
(
cle
!=
CL_SUCCESS
)
{
if
(
cle
!=
CL_SUCCESS
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to set kernel "
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to set kernel "
"source image argument: %d.
\n
"
,
cle
);
"source image argument: %d.
\n
"
,
cle
);
err
=
AVERROR_UNKNOWN
;
goto
fail
;
goto
fail
;
}
}
cle
=
clSetKernelArg
(
ctx
->
kernel_horiz
,
2
,
sizeof
(
cl_int
),
&
radius_x
);
cle
=
clSetKernelArg
(
ctx
->
kernel_horiz
,
2
,
sizeof
(
cl_int
),
&
radius_x
);
if
(
cle
!=
CL_SUCCESS
)
{
if
(
cle
!=
CL_SUCCESS
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to set kernel "
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to set kernel "
"sizeX argument: %d.
\n
"
,
cle
);
"sizeX argument: %d.
\n
"
,
cle
);
err
=
AVERROR_UNKNOWN
;
goto
fail
;
goto
fail
;
}
}
...
@@ -193,18 +196,21 @@ static int avgblur_opencl_filter_frame(AVFilterLink *inlink, AVFrame *input)
...
@@ -193,18 +196,21 @@ static int avgblur_opencl_filter_frame(AVFilterLink *inlink, AVFrame *input)
if
(
cle
!=
CL_SUCCESS
)
{
if
(
cle
!=
CL_SUCCESS
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to set kernel "
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to set kernel "
"destination image argument: %d.
\n
"
,
cle
);
"destination image argument: %d.
\n
"
,
cle
);
err
=
AVERROR_UNKNOWN
;
goto
fail
;
goto
fail
;
}
}
cle
=
clSetKernelArg
(
ctx
->
kernel_vert
,
1
,
sizeof
(
cl_mem
),
&
inter
);
cle
=
clSetKernelArg
(
ctx
->
kernel_vert
,
1
,
sizeof
(
cl_mem
),
&
inter
);
if
(
cle
!=
CL_SUCCESS
)
{
if
(
cle
!=
CL_SUCCESS
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to set kernel "
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to set kernel "
"source image argument: %d.
\n
"
,
cle
);
"source image argument: %d.
\n
"
,
cle
);
err
=
AVERROR_UNKNOWN
;
goto
fail
;
goto
fail
;
}
}
cle
=
clSetKernelArg
(
ctx
->
kernel_vert
,
2
,
sizeof
(
cl_int
),
&
radius_y
);
cle
=
clSetKernelArg
(
ctx
->
kernel_vert
,
2
,
sizeof
(
cl_int
),
&
radius_y
);
if
(
cle
!=
CL_SUCCESS
)
{
if
(
cle
!=
CL_SUCCESS
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to set kernel "
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to set kernel "
"sizeY argument: %d.
\n
"
,
cle
);
"sizeY argument: %d.
\n
"
,
cle
);
err
=
AVERROR_UNKNOWN
;
goto
fail
;
goto
fail
;
}
}
...
...
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