[FFmpeg-devel] [PATCH] Better print representation of number limits

João Bernardo jbvsmo at gmail.com
Fri Jan 24 20:28:51 CET 2014


Signed-off-by: João Bernardo Oliveira <jbvsmo at gmail.com>
---
 libavutil/opt.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/libavutil/opt.c b/libavutil/opt.c
index 07864f2..6ecc14e 100644
--- a/libavutil/opt.c
+++ b/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);
     }
-- 
1.8.3.2


More information about the ffmpeg-devel mailing list