mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-15 11:30:08 +01:00
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.
This commit is contained in:
@@ -106,7 +106,7 @@ static char *value_string(char *buf, int buf_size, struct unit_value uv)
|
|||||||
const char *prefix_string = "";
|
const char *prefix_string = "";
|
||||||
int l;
|
int l;
|
||||||
|
|
||||||
if (use_value_prefix) {
|
if (use_value_prefix && vald > 1) {
|
||||||
long long int index;
|
long long int index;
|
||||||
|
|
||||||
if (uv.unit == unit_byte_str && use_byte_value_binary_prefix) {
|
if (uv.unit == unit_byte_str && use_byte_value_binary_prefix) {
|
||||||
|
|||||||
Reference in New Issue
Block a user