Browse Source

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.
tags/n0.10
Stefano Sabatini 13 years ago
parent
commit
4601ad769d
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      ffprobe.c

+ 1
- 1
ffprobe.c View File

@@ -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) {


Loading…
Cancel
Save