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

lance.lmwang at gmail.com lance.lmwang at gmail.com
Fri Apr 10 14:04:38 EEST 2020


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);
 }
 
 static void flat_print_str(WriterContext *wctx, const char *key, const char *value)
@@ -1440,7 +1440,7 @@ static void ini_print_str(WriterContext *wctx, const char *key, const char *valu
 
 static void ini_print_int(WriterContext *wctx, const char *key, long long int value)
 {
-    printf("%s=%lld\n", key, value);
+    printf("%s=%"PRId64"\n", key, value);
 }
 
 static const Writer ini_writer = {
@@ -1603,7 +1603,7 @@ static void json_print_int(WriterContext *wctx, const char *key, long long int v
         JSON_INDENT();
 
     av_bprint_init(&buf, 1, AV_BPRINT_SIZE_UNLIMITED);
-    printf("\"%s\": %lld", json_escape_str(&buf, key, wctx), value);
+    printf("\"%s\": %"PRId64, json_escape_str(&buf, key, wctx), value);
     av_bprint_finalize(&buf, NULL);
 }
 
@@ -1776,7 +1776,7 @@ static void xml_print_int(WriterContext *wctx, const char *key, long long int va
 {
     if (wctx->nb_item[wctx->level])
         printf(" ");
-    printf("%s=\"%lld\"", key, value);
+    printf("%s=\"%"PRId64"\"", key, value);
 }
 
 static Writer xml_writer = {
-- 
2.21.0



More information about the ffmpeg-devel mailing list