aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/opt.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-28 11:26:48 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-10-28 11:26:48 +0100
commitf0e43e60cd09bf68b4d6e6ab9b56f690b61ee068 (patch)
tree38d2c6aad84acda9240bcfffdd7f96e0a7ef2d92 /libavutil/opt.c
parentac3fa95e73e52179c52cb0f117c06cdbaced6893 (diff)
parent0b357a8095e72b092cc5c2aacc2f806db75ecae3 (diff)
downloadffmpeg-f0e43e60cd09bf68b4d6e6ab9b56f690b61ee068.tar.gz
Merge commit '0b357a8095e72b092cc5c2aacc2f806db75ecae3'
* commit '0b357a8095e72b092cc5c2aacc2f806db75ecae3': AVOptions: do not range check flag options. Conflicts: libavutil/opt.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/opt.c')
-rw-r--r--libavutil/opt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c
index a367dbbbcb..2bf5346ac2 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -93,7 +93,8 @@ static int read_number(const AVOption *o, void *dst, double *num, int *den, int6
static int write_number(void *obj, const AVOption *o, void *dst, double num, int den, int64_t intnum)
{
- if (o->max*den < num*intnum || o->min*den > num*intnum) {
+ if (o->type != AV_OPT_TYPE_FLAGS &&
+ (o->max * den < num * intnum || o->min * den > num * intnum)) {
av_log(obj, AV_LOG_ERROR, "Value %f for parameter '%s' out of range [%g - %g]\n",
num*intnum/den, o->name, o->min, o->max);
return AVERROR(ERANGE);