avutil/opt: Remove obsolete LIBAVUTIL_VERSION_MAJOR checks

Removing them has been forgotten during the lavu 59->60 bump.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2026-03-09 07:12:09 +01:00
parent 87bf42899b
commit 9bbe1ec86f

View File

@@ -191,20 +191,12 @@ static int opt_set_init(void *obj, const char *name, int search_flags,
// try state flags first from the target (child), then from its parent
class = *(const AVClass**)tgt;
if (
#if LIBAVUTIL_VERSION_MAJOR < 60
class->version >= AV_VERSION_INT(59, 41, 100) &&
#endif
class->state_flags_offset)
if (class->state_flags_offset)
state_flags = (unsigned*)((uint8_t*)tgt + class->state_flags_offset);
if (!state_flags && obj != tgt) {
class = *(const AVClass**)obj;
if (
#if LIBAVUTIL_VERSION_MAJOR < 60
class->version >= AV_VERSION_INT(59, 41, 100) &&
#endif
class->state_flags_offset)
if (class->state_flags_offset)
state_flags = (unsigned*)((uint8_t*)obj + class->state_flags_offset);
}
@@ -212,9 +204,7 @@ static int opt_set_init(void *obj, const char *name, int search_flags,
av_log(obj, AV_LOG_ERROR, "Option '%s' is not a runtime option and "
"so cannot be set after the object has been initialized\n",
o->name);
#if LIBAVUTIL_VERSION_MAJOR >= 60
return AVERROR(EINVAL);
#endif
}
}