mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2025-01-08 12:21:07 +00:00
lavu/opt: fix range check logic in set_format()
In particular, allow to reject undefined values. Previously the code was only accepting values in the range -1 .. NB_FORMATS-1.
This commit is contained in:
parent
165f96cd2d
commit
e2b54464c6
@ -559,8 +559,8 @@ static int set_format(void *obj, const char *name, int fmt, int search_flags,
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
min = FFMIN(o->min, -1);
|
||||
max = FFMAX(o->max, nb_fmts-1);
|
||||
min = FFMAX(o->min, -1);
|
||||
max = FFMIN(o->max, nb_fmts-1);
|
||||
}
|
||||
if (fmt < min || fmt > max) {
|
||||
av_log(obj, AV_LOG_ERROR,
|
||||
|
Loading…
Reference in New Issue
Block a user