[FFmpeg-devel] [PATCH v1] fftools/ffprobe: Use format specifier PRId64 instead of %lld
Limin Wang
lance.lmwang at gmail.com
Sat Apr 11 04:57:22 EEST 2020
On Fri, Apr 10, 2020 at 07:37:40PM +0200, Michael Niedermayer wrote:
> 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
yes, my fault, lld is for "long long int" is no problem. I originally plan to change "long
long int" to int64_t, but I'm not sure if the original code has other ideas which I'm missing.
>
> [...]
> --
> 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.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
--
Thanks,
Limin Wang
More information about the ffmpeg-devel
mailing list