[FFmpeg-devel] [PATCH] avutil/opt: Fix AV_OPT_TYPE_CONST default value

Anton Khirnov anton at khirnov.net
Mon Feb 12 11:16:21 EET 2024


Quoting Andreas Rheinhardt (2024-02-04 17:54:35)
> It uses the int64_t instead of the double member.
> 
> (This code can currently not be reached: av_opt_get() calls
> av_opt_find2() with NULL as unit in which case AV_OPT_TYPE_CONST
> options are never returned, leading av_opt_get() to always
> return AVERROR_OPTION_NOT_FOUND when searching for AV_OPT_TYPE_CONST*.
> For the same reason the code read_number() will never be called
> from get_number() when searching for an option of type
> AV_OPT_TYPE_CONST. The other callers of read_number() also only
> call it with types other than AV_OPT_TYPE_CONST.)

Is there a reason you're not disabling that code with an assert instead?

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list