avutil/opt: Better print representation of number limits

Signed-off-by: João Bernardo Oliveira <jbvsmo@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/54/head
João Bernardo 11 years ago committed by Michael Niedermayer
parent 934bb11ad7
commit 290326711b
  1. 14
      libavutil/opt.c

@ -921,6 +921,8 @@ static void log_value(void *av_log_obj, int level, double d)
av_log(av_log_obj, level, "INT_MAX");
} else if (d == INT_MIN) {
av_log(av_log_obj, level, "INT_MIN");
} else if (d == UINT32_MAX) {
av_log(av_log_obj, level, "UINT32_MAX");
} else if (d == (double)INT64_MAX) {
av_log(av_log_obj, level, "I64_MAX");
} else if (d == INT64_MIN) {
@ -929,6 +931,18 @@ static void log_value(void *av_log_obj, int level, double d)
av_log(av_log_obj, level, "FLT_MAX");
} else if (d == FLT_MIN) {
av_log(av_log_obj, level, "FLT_MIN");
} else if (d == -FLT_MAX) {
av_log(av_log_obj, level, "-FLT_MAX");
} else if (d == -FLT_MIN) {
av_log(av_log_obj, level, "-FLT_MIN");
} else if (d == DBL_MAX) {
av_log(av_log_obj, level, "DBL_MAX");
} else if (d == DBL_MIN) {
av_log(av_log_obj, level, "DBL_MIN");
} else if (d == -DBL_MAX) {
av_log(av_log_obj, level, "-DBL_MAX");
} else if (d == -DBL_MIN) {
av_log(av_log_obj, level, "-DBL_MIN");
} else {
av_log(av_log_obj, level, "%g", d);
}

Loading…
Cancel
Save