avfilter/vf_addroi: Use chars instead of strings for one-char strings
Reviewed-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
7684182921
commit
2089d21bc7
@ -26,8 +26,8 @@ enum {
|
|||||||
X, Y, W, H,
|
X, Y, W, H,
|
||||||
NB_PARAMS,
|
NB_PARAMS,
|
||||||
};
|
};
|
||||||
static const char *addroi_param_names[] = {
|
static const char addroi_param_names[] = {
|
||||||
"x", "y", "w", "h",
|
'x', 'y', 'w', 'h',
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@ -74,12 +74,12 @@ static int addroi_config_input(AVFilterLink *inlink)
|
|||||||
|
|
||||||
val = av_expr_eval(ctx->region_expr[i], vars, NULL);
|
val = av_expr_eval(ctx->region_expr[i], vars, NULL);
|
||||||
if (val < 0.0) {
|
if (val < 0.0) {
|
||||||
av_log(avctx, AV_LOG_WARNING, "Calculated value %g for %s is "
|
av_log(avctx, AV_LOG_WARNING, "Calculated value %g for %c is "
|
||||||
"less than zero - using zero instead.\n", val,
|
"less than zero - using zero instead.\n", val,
|
||||||
addroi_param_names[i]);
|
addroi_param_names[i]);
|
||||||
val = 0.0;
|
val = 0.0;
|
||||||
} else if (val > max_value) {
|
} else if (val > max_value) {
|
||||||
av_log(avctx, AV_LOG_WARNING, "Calculated value %g for %s is "
|
av_log(avctx, AV_LOG_WARNING, "Calculated value %g for %c is "
|
||||||
"greater than maximum allowed value %d - "
|
"greater than maximum allowed value %d - "
|
||||||
"using %d instead.\n", val, addroi_param_names[i],
|
"using %d instead.\n", val, addroi_param_names[i],
|
||||||
max_value, max_value);
|
max_value, max_value);
|
||||||
@ -194,7 +194,7 @@ static av_cold int addroi_init(AVFilterContext *avctx)
|
|||||||
0, avctx);
|
0, avctx);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
av_log(ctx, AV_LOG_ERROR,
|
av_log(ctx, AV_LOG_ERROR,
|
||||||
"Error parsing %s expression '%s'.\n",
|
"Error parsing %c expression '%s'.\n",
|
||||||
addroi_param_names[i], ctx->region_str[i]);
|
addroi_param_names[i], ctx->region_str[i]);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user