[FFmpeg-devel] [PATCH] ffprobe: increase precision for the shown float values

Michael Niedermayer michaelni at gmx.at
Thu Jan 19 23:26:47 CET 2012


On Thu, Jan 19, 2012 at 01:54:38AM +0100, Stefano Sabatini wrote:
> ---
>  ffprobe.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/ffprobe.c b/ffprobe.c
> index 114e699..f31d025 100644
> --- a/ffprobe.c
> +++ b/ffprobe.c
> @@ -123,7 +123,7 @@ static char *value_string(char *buf, int buf_size, struct unit_value uv)
>          }
>  
>          if (show_float || (use_value_prefix && vald != (long long int)vald))
> -            l = snprintf(buf, buf_size, "%.3f", vald);
> +            l = snprintf(buf, buf_size, "%f", vald);
>          else
>              l = snprintf(buf, buf_size, "%lld", (long long int)vald);
>          snprintf(buf+l, buf_size-l, "%s%s%s", *prefix_string || show_value_unit ? " " : "",

LGTM

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120119/902efa35/attachment.asc>


More information about the ffmpeg-devel mailing list