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; }