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
63be97ec
Commit
63be97ec
authored
Dec 17, 2014
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi: always check av_expr_parse_and_eval() return value
CC: libav-stable@libav.org Bug-Id: CID 703624
parent
9e06327e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
vf_pad.c
libavfilter/vf_pad.c
+8
-6
vf_scale.c
libavfilter/vf_scale.c
+4
-3
No files found.
libavfilter/vf_pad.c
View file @
63be97ec
...
...
@@ -158,9 +158,10 @@ static int config_input(AVFilterLink *inlink)
var_values
[
VAR_VSUB
]
=
1
<<
s
->
vsub
;
/* evaluate width and height */
av_expr_parse_and_eval
(
&
res
,
(
expr
=
s
->
w_expr
),
var_names
,
var_values
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
0
,
ctx
);
if
((
ret
=
av_expr_parse_and_eval
(
&
res
,
(
expr
=
s
->
w_expr
),
var_names
,
var_values
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
0
,
ctx
))
<
0
)
goto
eval_fail
;
s
->
w
=
var_values
[
VAR_OUT_W
]
=
var_values
[
VAR_OW
]
=
res
;
if
((
ret
=
av_expr_parse_and_eval
(
&
res
,
(
expr
=
s
->
h_expr
),
var_names
,
var_values
,
...
...
@@ -175,9 +176,10 @@ static int config_input(AVFilterLink *inlink)
s
->
w
=
var_values
[
VAR_OUT_W
]
=
var_values
[
VAR_OW
]
=
res
;
/* evaluate x and y */
av_expr_parse_and_eval
(
&
res
,
(
expr
=
s
->
x_expr
),
var_names
,
var_values
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
0
,
ctx
);
if
((
ret
=
av_expr_parse_and_eval
(
&
res
,
(
expr
=
s
->
x_expr
),
var_names
,
var_values
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
0
,
ctx
))
<
0
)
goto
eval_fail
;
s
->
x
=
var_values
[
VAR_X
]
=
res
;
if
((
ret
=
av_expr_parse_and_eval
(
&
res
,
(
expr
=
s
->
y_expr
),
var_names
,
var_values
,
...
...
libavfilter/vf_scale.c
View file @
63be97ec
...
...
@@ -177,9 +177,10 @@ static int config_props(AVFilterLink *outlink)
var_values
[
VAR_VSUB
]
=
1
<<
desc
->
log2_chroma_h
;
/* evaluate width and height */
av_expr_parse_and_eval
(
&
res
,
(
expr
=
scale
->
w_expr
),
var_names
,
var_values
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
0
,
ctx
);
if
((
ret
=
av_expr_parse_and_eval
(
&
res
,
(
expr
=
scale
->
w_expr
),
var_names
,
var_values
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
0
,
ctx
))
<
0
)
goto
fail
;
scale
->
w
=
var_values
[
VAR_OUT_W
]
=
var_values
[
VAR_OW
]
=
res
;
if
((
ret
=
av_expr_parse_and_eval
(
&
res
,
(
expr
=
scale
->
h_expr
),
var_names
,
var_values
,
...
...
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