From ef89ac408b2b225408086b055659656eb79e96c4 Mon Sep 17 00:00:00 2001 From: nilfm Date: Fri, 21 Jul 2023 11:56:39 +0100 Subject: [PATCH] Add code paths for string type options to appear in the feature name --- libvmaf/src/feature/feature_name.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libvmaf/src/feature/feature_name.c b/libvmaf/src/feature/feature_name.c index 3a5d0f762..f54390f72 100644 --- a/libvmaf/src/feature/feature_name.c +++ b/libvmaf/src/feature/feature_name.c @@ -99,6 +99,8 @@ static int option_is_default(const VmafOption *opt, const void *data) return opt->default_val.i == *((int*)data); case VMAF_OPT_TYPE_DOUBLE: return opt->default_val.d == *((double*)data); + case VMAF_OPT_TYPE_STRING: + return !strcmp(opt->default_val.s, *((char**)data)); default: return -EINVAL; } @@ -136,6 +138,9 @@ char *vmaf_feature_name_from_options(const char *name, const VmafOption *opts, case VMAF_OPT_TYPE_DOUBLE: snprintf(buf, buf_sz, "%g", *((double*)data)); break; + case VMAF_OPT_TYPE_STRING: + snprintf(buf, buf_sz, "%s", *((char**)data)); + break; default: break; }