X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavutil%2Fopt.c;h=df88663e3f09b52184fd948c5004f5a4b35f67ff;hb=1b6803b79549567b9261208a1c21391e2da570ce;hp=6f870789265a9e8371e28ff9ca15f89456051b6e;hpb=b02b43a823a6ff0278f1ac5d0cfe3ac698d67ba5;p=ffmpeg diff --git a/libavutil/opt.c b/libavutil/opt.c index 6f870789265..df88663e3f0 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -98,7 +98,7 @@ static int write_number(void *obj, const AVOption *o, void *dst, double num, int { if (o->type != AV_OPT_TYPE_FLAGS && (!den || o->max * den < num * intnum || o->min * den > num * intnum)) { - num = den ? num * intnum / den : (num * intnum ? INFINITY : NAN); + num = den ? num * intnum / den : (num && intnum ? INFINITY : NAN); av_log(obj, AV_LOG_ERROR, "Value %f for parameter '%s' out of range [%g - %g]\n", num, o->name, o->min, o->max); return AVERROR(ERANGE);