Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
63be97ec
Commit
63be97ec
authored
10 years ago
by
Vittorio Giovara
Browse files
Options
Downloads
Patches
Plain Diff
lavfi: always check av_expr_parse_and_eval() return value
CC: libav-stable@libav.org Bug-Id: CID 703624
parent
9e06327e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavfilter/vf_pad.c
+8
-6
8 additions, 6 deletions
libavfilter/vf_pad.c
libavfilter/vf_scale.c
+4
-3
4 additions, 3 deletions
libavfilter/vf_scale.c
with
12 additions
and
9 deletions
libavfilter/vf_pad.c
+
8
−
6
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
,
...
...
This diff is collapsed.
Click to expand it.
libavfilter/vf_scale.c
+
4
−
3
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
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment