[FFmpeg-devel] [PATCH] ffprobe: fix value_string() prefix printing for values with negative logarithm
Stefano Sabatini
stefasab at gmail.com
Fri Jan 20 13:41:10 CET 2012
On date Thursday 2012-01-19 01:54:28 +0100, Stefano Sabatini encoded:
> The index for the binary_unit_prefixes array is expected to be positive,
> so avoid to use negative indexes for accessing it.
> ---
> ffprobe.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/ffprobe.c b/ffprobe.c
> index 9aa9e6b..114e699 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) {
> --
> 1.7.5.4
Applied.
--
FFmpeg = Friendly and Fanciful Mastering Puritan Epic Geisha
More information about the ffmpeg-devel
mailing list