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
094673ff
Commit
094673ff
authored
Feb 22, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eval: support 3 parameter functions.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
43b1943a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
eval.c
libavutil/eval.c
+8
-3
No files found.
libavutil/eval.c
View file @
094673ff
...
...
@@ -145,7 +145,7 @@ struct AVExpr {
double
(
*
func1
)(
void
*
,
double
);
double
(
*
func2
)(
void
*
,
double
,
double
);
}
a
;
struct
AVExpr
*
param
[
2
];
struct
AVExpr
*
param
[
3
];
double
*
var
;
};
...
...
@@ -229,6 +229,7 @@ void av_expr_free(AVExpr *e)
if
(
!
e
)
return
;
av_expr_free
(
e
->
param
[
0
]);
av_expr_free
(
e
->
param
[
1
]);
av_expr_free
(
e
->
param
[
2
]);
av_freep
(
&
e
->
var
);
av_freep
(
&
e
);
}
...
...
@@ -301,6 +302,10 @@ static int parse_primary(AVExpr **e, Parser *p)
p
->
s
++
;
// ","
parse_expr
(
&
d
->
param
[
1
],
p
);
}
if
(
p
->
s
[
0
]
==
','
)
{
p
->
s
++
;
// ","
parse_expr
(
&
d
->
param
[
2
],
p
);
}
if
(
p
->
s
[
0
]
!=
')'
)
{
av_log
(
p
,
AV_LOG_ERROR
,
"Missing ')' or too many args in '%s'
\n
"
,
s0
);
av_expr_free
(
d
);
...
...
@@ -517,8 +522,8 @@ static int verify_expr(AVExpr *e)
case
e_sqrt
:
case
e_not
:
case
e_random
:
return
verify_expr
(
e
->
param
[
0
]);
default:
return
verify_expr
(
e
->
param
[
0
])
&&
verify_expr
(
e
->
param
[
1
]);
return
verify_expr
(
e
->
param
[
0
])
&&
!
e
->
param
[
2
]
;
default:
return
verify_expr
(
e
->
param
[
0
])
&&
verify_expr
(
e
->
param
[
1
])
&&
!
e
->
param
[
2
]
;
}
}
...
...
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