mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 12:50:49 +08:00
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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user