This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/8.1 in repository ffmpeg.
commit c0ddaa9f386c2389f5ea01e2300e75eca5061ef5 Author: Niklas Haas <[email protected]> AuthorDate: Fri Aug 28 18:31:59 2026 +0200 Commit: Michael Niedermayer <[email protected]> CommitDate: Sat Sep 19 14:27:19 2026 +0200 avutil/opt: fix av_opt_is_set_to_default() on default-NAN options Affects filters like vf_tonemap, vf_nlmeans_vulkan and vf_zscale that use NAN as an explicit default value to indicate "not set by user". Signed-off-by: Niklas Haas <[email protected]> (cherry picked from commit 5815e6343c99a2e728f6481e9c59f85c3f6f7668) Signed-off-by: Michael Niedermayer <[email protected]> --- libavutil/opt.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libavutil/opt.c b/libavutil/opt.c index 7c6a01068a..ebf2d22471 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -2647,13 +2647,15 @@ int av_opt_is_set_to_default(void *obj, const AVOption *o) return !strcmp(str, o->default_val.str); case AV_OPT_TYPE_DOUBLE: d = *(double *)dst; - return o->default_val.dbl == d; + return o->default_val.dbl == d || isnan(d) && isnan(o->default_val.dbl); case AV_OPT_TYPE_FLOAT: d = *(float *)dst; - return (float)o->default_val.dbl == d; - case AV_OPT_TYPE_RATIONAL: + return (float)o->default_val.dbl == d || isnan(d) && isnan(o->default_val.dbl); + case AV_OPT_TYPE_RATIONAL: { + AVRational v = *(AVRational *) dst; q = av_d2q(o->default_val.dbl, INT_MAX); - return !av_cmp_q(*(AVRational*)dst, q); + return !av_cmp_q(v, q) || (!q.den && !v.den); + } case AV_OPT_TYPE_BINARY: { struct { uint8_t *data; -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
