summaryrefslogtreecommitdiffstats
path: root/ffprobe.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-01-19 01:34:30 +0100
committerStefano Sabatini <stefasab@gmail.com>2012-01-20 13:27:52 +0100
commit4601ad769df9a5c4e51a06a75a23c1f8f39595eb (patch)
treec619f429b95cbadf7cdd62e70d6e8667a154d7df /ffprobe.c
parenteef4b70450b5ed57a5c57a719d31b8ca14532bc9 (diff)
downloadffmpeg-streaming-4601ad769df9a5c4e51a06a75a23c1f8f39595eb.zip
ffmpeg-streaming-4601ad769df9a5c4e51a06a75a23c1f8f39595eb.tar.gz
ffprobe: fix value_string() prefix printing for values with negative logarithm
The index for the binary_unit_prefixes array is expected to be positive, so avoid to use negative indexes for accessing it.
Diffstat (limited to 'ffprobe.c')
-rw-r--r--ffprobe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffprobe.c b/ffprobe.c
index ce4883b..92b0f45 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -106,7 +106,7 @@ static char *value_string(char *buf, int buf_size, struct unit_value uv)
const char *prefix_string = "";
int l;
- if (use_value_prefix) {
+ if (use_value_prefix && vald > 1) {
long long int index;
if (uv.unit == unit_byte_str && use_byte_value_binary_prefix) {
OpenPOWER on IntegriCloud