git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15802e7
)
ffprobe: in value_string(), do not print trailing space in case of no suffix
author
Stefano Sabatini
<stefano.sabatini-lala@poste.it>
Tue, 16 Aug 2011 22:34:15 +0000
(
00:34
+0200)
committer
Stefano Sabatini
<stefano.sabatini-lala@poste.it>
Wed, 17 Aug 2011 08:29:34 +0000
(10:29 +0200)
ffprobe.c
patch
|
blob
|
history
diff --git
a/ffprobe.c
b/ffprobe.c
index
f857311
..
4ef9902
100644
(file)
--- a/
ffprobe.c
+++ b/
ffprobe.c
@@
-83,9
+83,11
@@
static char *value_string(char *buf, int buf_size, double val, const char *unit)
prefix_string = decimal_unit_prefixes[index];
}
- snprintf(buf, buf_size, "%.3f %s%s", val, prefix_string, show_value_unit ? unit : "");
+ snprintf(buf, buf_size, "%.3f%s%s%s", val, prefix_string || show_value_unit ? " " : "",
+ prefix_string, show_value_unit ? unit : "");
} else {
- snprintf(buf, buf_size, "%f %s", val, show_value_unit ? unit : "");
+ snprintf(buf, buf_size, "%f%s%s", val, show_value_unit ? " " : "",
+ show_value_unit ? unit : "");
}
return buf;