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
4de2106f
Commit
4de2106f
authored
Jan 15, 2020
by
Gyan Doshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/pad: improve error check for w and h
Target dimensions have to cover entire input.
parent
f8990c5f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
vf_pad.c
libavfilter/vf_pad.c
+4
-4
No files found.
libavfilter/vf_pad.c
View file @
4de2106f
...
...
@@ -178,14 +178,14 @@ static int config_input(AVFilterLink *inlink)
if
(
s
->
y
<
0
||
s
->
y
+
inlink
->
h
>
s
->
h
)
s
->
y
=
var_values
[
VAR_Y
]
=
(
s
->
h
-
inlink
->
h
)
/
2
;
s
->
w
=
ff_draw_round_to_sub
(
&
s
->
draw
,
0
,
-
1
,
s
->
w
);
s
->
h
=
ff_draw_round_to_sub
(
&
s
->
draw
,
1
,
-
1
,
s
->
h
);
/* sanity check params */
if
(
s
->
w
<
0
||
s
->
h
<
0
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"
Negative values are not acceptable
.
\n
"
);
if
(
s
->
w
<
inlink
->
w
||
s
->
h
<
inlink
->
h
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"
Padded dimensions cannot be smaller than input dimensions
.
\n
"
);
return
AVERROR
(
EINVAL
);
}
s
->
w
=
ff_draw_round_to_sub
(
&
s
->
draw
,
0
,
-
1
,
s
->
w
);
s
->
h
=
ff_draw_round_to_sub
(
&
s
->
draw
,
1
,
-
1
,
s
->
h
);
s
->
x
=
ff_draw_round_to_sub
(
&
s
->
draw
,
0
,
-
1
,
s
->
x
);
s
->
y
=
ff_draw_round_to_sub
(
&
s
->
draw
,
1
,
-
1
,
s
->
y
);
s
->
in_w
=
ff_draw_round_to_sub
(
&
s
->
draw
,
0
,
-
1
,
inlink
->
w
);
...
...
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