[FFmpeg-devel] [PATCH] ffprobe: fix scaling of vali

Michael Niedermayer michaelni at gmx.at
Mon Apr 21 13:06:36 CEST 2014


Fixes Ticket3523

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 ffprobe.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ffprobe.c b/ffprobe.c
index 9e39ff7..bc2497c 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -217,7 +217,7 @@ static char *value_string(char *buf, int buf_size, struct unit_value uv)
         vald = uv.val.d;
         show_float = 1;
     } else {
-        vald = vali = uv.val.i;
+        vald = uv.val.i;
     }
 
     if (uv.unit == unit_second_str && use_value_sexagesimal_format) {
@@ -247,8 +247,9 @@ static char *value_string(char *buf, int buf_size, struct unit_value uv)
                 prefix_string = decimal_unit_prefixes[index];
             }
         }
+        vali = vald;
 
-        if (show_float || (use_value_prefix && vald != (long long int)vald))
+        if (show_float || (use_value_prefix && vald != vali))
             snprintf(buf, buf_size, "%f", vald);
         else
             snprintf(buf, buf_size, "%lld", vali);
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list