This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 5815e6343c99a2e728f6481e9c59f85c3f6f7668 Author: Niklas Haas <[email protected]> AuthorDate: Fri Aug 28 18:31:59 2026 +0200 Commit: Niklas Haas <[email protected]> CommitDate: Fri Sep 11 22:00:27 2026 +0000 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]> --- libavutil/opt.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libavutil/opt.c b/libavutil/opt.c index 17bd453dad..8c3678d1be 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -2711,13 +2711,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]
