vapoursynth: Fix default argument for color range

Unlike the other arguments for the resize function, "range_in" does not
use the same format as in the frame props. A frame prop _Range=1 means
limited, while an argument range_in=1 means full range.
This commit is contained in:
arch1t3cht 2023-01-02 02:13:04 +01:00
parent b7f3e19e00
commit 3b02a199f0

View file

@ -101,6 +101,9 @@ void VapoursynthVideoProvider::SetResizeArg(VSMap *args, const VSMap *props, con
int result = vs.GetAPI()->mapGetInt(props, prop_name, 0, &err);
if (err != 0 || result == unspecified) {
result = deflt;
if (!strcmp(arg_name, "range_in")) {
result = result == VSC_RANGE_FULL ? 1 : 0;
}
vs.GetAPI()->mapSetInt(args, arg_name, result, maAppend);
}
}