[FFmpeg-devel] [PATCH v1] fftools/ffprobe: Use format specifier PRId64 instead of %lld

Michael Niedermayer michael at niedermayer.cc
Fri Apr 10 20:37:40 EEST 2020


On Fri, Apr 10, 2020 at 07:04:38PM +0800, lance.lmwang at gmail.com wrote:
> From: Limin Wang <lance.lmwang at gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> ---
>  fftools/ffprobe.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
> index e3f221f560..a32bc529d9 100644
> --- a/fftools/ffprobe.c
> +++ b/fftools/ffprobe.c
> @@ -408,7 +408,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))
>              snprintf(buf, buf_size, "%f", vald);
>          else
> -            snprintf(buf, buf_size, "%lld", vali);
> +            snprintf(buf, buf_size, "%"PRId64, vali);
>          av_strlcatf(buf, buf_size, "%s%s%s", *prefix_string || show_value_unit ? " " : "",
>                   prefix_string, show_value_unit ? uv.unit : "");
>      }
> @@ -1002,7 +1002,7 @@ static void default_print_int(WriterContext *wctx, const char *key, long long in
>  
>      if (!def->nokey)
>          printf("%s%s=", wctx->section_pbuf[wctx->level].str, key);
> -    printf("%lld\n", value);
> +    printf("%"PRId64"\n", value);
>  }
>  
>  static const Writer default_writer = {
> @@ -1179,7 +1179,7 @@ static void compact_print_int(WriterContext *wctx, const char *key, long long in
>      if (wctx->nb_item[wctx->level]) printf("%c", compact->item_sep);
>      if (!compact->nokey)
>          printf("%s%s=", wctx->section_pbuf[wctx->level].str, key);
> -    printf("%lld", value);
> +    printf("%"PRId64, value);
>  }
>  
>  static const Writer compact_writer = {

> @@ -1322,7 +1322,7 @@ static void flat_print_section_header(WriterContext *wctx)
>  
>  static void flat_print_int(WriterContext *wctx, const char *key, long long int value)
>  {
> -    printf("%s%s=%lld\n", wctx->section_pbuf[wctx->level].str, key, value);
> +    printf("%s%s=%"PRId64"\n", wctx->section_pbuf[wctx->level].str, key, value);
>  }

the type does not match here

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you fake or manipulate statistics in a paper in physics you will never
get a job again.
If you fake or manipulate statistics in a paper in medicin you will get
a job for life at the pharma industry.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200410/7d0ee881/attachment.sig>


More information about the ffmpeg-devel mailing list