diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-08-17 00:34:15 +0200 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-08-17 10:29:34 +0200 |
commit | 7c94740b84f95f4a1e3a70884dc1928ce3bc2570 (patch) | |
tree | 201fbfa35109705859558752bd7cb858900277a9 /ffprobe.c | |
parent | 15802e78e7d704560ab12c4d063250189f5b774a (diff) | |
download | ffmpeg-7c94740b84f95f4a1e3a70884dc1928ce3bc2570.tar.gz |
ffprobe: in value_string(), do not print trailing space in case of no suffix
Diffstat (limited to 'ffprobe.c')
-rw-r--r-- | ffprobe.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; |