diff options
author | Gyan Doshi <ffmpeg@gyani.pro> | 2021-05-14 13:20:30 +0300 |
---|---|---|
committer | Gyan Doshi <ffmpeg@gyani.pro> | 2021-05-16 07:54:27 +0300 |
commit | f53414a0382701b9bc984f657939d4227c7c568a (patch) | |
tree | b618455807820f8cf11f25012fd2a2b887eacfb3 /libavfilter/f_metadata.c | |
parent | bc40cd621440107ee7fbe6ec6cab2397acc3874b (diff) |
avfilter/metadata: add intuitive labels for metadata values
Diffstat (limited to 'libavfilter/f_metadata.c')
-rw-r--r-- | libavfilter/f_metadata.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c index 5fec7c3c56..e7c7b00118 100644 --- a/libavfilter/f_metadata.c +++ b/libavfilter/f_metadata.c @@ -61,12 +61,16 @@ enum MetadataFunction { static const char *const var_names[] = { "VALUE1", "VALUE2", + "FRAMEVAL", + "USERVAL", NULL }; enum var_name { VAR_VALUE1, VAR_VALUE2, + VAR_FRAMEVAL, + VAR_USERVAL, VAR_VARS_NB }; @@ -172,8 +176,8 @@ static int parse_expr(MetadataContext *s, const char *value1, const char *value2 if (sscanf(value1, "%lf", &f1) + sscanf(value2, "%lf", &f2) != 2) return 0; - s->var_values[VAR_VALUE1] = f1; - s->var_values[VAR_VALUE2] = f2; + s->var_values[VAR_VALUE1] = s->var_values[VAR_FRAMEVAL] = f1; + s->var_values[VAR_VALUE2] = s->var_values[VAR_USERVAL] = f2; return av_expr_eval(s->expr, s->var_values, NULL); } |