[FFmpeg-cvslog] fftools/ffmpeg: use correct unit prefix symbol for binary scaled byte values

王昊然 git at videolan.org
Sat Feb 3 13:56:38 EET 2024


ffmpeg | branch: master | 王昊然 <msl0000023508 at gmail.com> | Mon Jan 29 15:54:27 2024 +0800| [344ec7a3f753de30c23149471e2c9eaf17f42187] | committer: Stefano Sabatini

fftools/ffmpeg: use correct unit prefix symbol for binary scaled byte values

Fix bug #10501

Signed-off-by: WHR <msl0000023508 at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=344ec7a3f753de30c23149471e2c9eaf17f42187
---

 fftools/ffmpeg.c     | 4 ++--
 fftools/ffmpeg_enc.c | 2 +-
 fftools/ffmpeg_mux.c | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 53df200d1a..035210a8e9 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -329,7 +329,7 @@ static void ffmpeg_cleanup(int ret)
 
     if (do_benchmark) {
         int maxrss = getmaxrss() / 1024;
-        av_log(NULL, AV_LOG_INFO, "bench: maxrss=%ikB\n", maxrss);
+        av_log(NULL, AV_LOG_INFO, "bench: maxrss=%iKiB\n", maxrss);
     }
 
     for (i = 0; i < nb_filtergraphs; i++)
@@ -570,7 +570,7 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
     speed   = pts != AV_NOPTS_VALUE && t != 0.0 ? (double)pts / AV_TIME_BASE / t : -1;
 
     if (total_size < 0) av_bprintf(&buf, "size=N/A time=");
-    else                av_bprintf(&buf, "size=%8.0fkB time=", total_size / 1024.0);
+    else                av_bprintf(&buf, "size=%8.0fKiB time=", total_size / 1024.0);
     if (pts == AV_NOPTS_VALUE) {
         av_bprintf(&buf, "N/A ");
     } else {
diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c
index bbd86a6fe1..e66f8e6183 100644
--- a/fftools/ffmpeg_enc.c
+++ b/fftools/ffmpeg_enc.c
@@ -613,7 +613,7 @@ static int update_video_stats(OutputStream *ost, const AVPacket *pkt, int write_
 
     bitrate     = (pkt->size * 8) / av_q2d(enc->time_base) / 1000.0;
     avg_bitrate = (double)(e->data_size * 8) / ti1 / 1000.0;
-    fprintf(vstats_file, "s_size= %8.0fkB time= %0.3f br= %7.1fkbits/s avg_br= %7.1fkbits/s ",
+    fprintf(vstats_file, "s_size= %8.0fKiB time= %0.3f br= %7.1fkbits/s avg_br= %7.1fkbits/s ",
            (double)e->data_size / 1024, ti1, bitrate, avg_bitrate);
     fprintf(vstats_file, "type= %c\n", av_get_picture_type_char(pict_type));
 
diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c
index ab86abee14..ee708267c1 100644
--- a/fftools/ffmpeg_mux.c
+++ b/fftools/ffmpeg_mux.c
@@ -725,8 +725,8 @@ static void mux_final_stats(Muxer *mux)
     }
 
     av_log(of, AV_LOG_INFO,
-           "video:%1.0fkB audio:%1.0fkB subtitle:%1.0fkB other streams:%1.0fkB "
-           "global headers:%1.0fkB muxing overhead: %s\n",
+           "video:%1.0fKiB audio:%1.0fKiB subtitle:%1.0fKiB other streams:%1.0fKiB "
+           "global headers:%1.0fKiB muxing overhead: %s\n",
            video_size    / 1024.0,
            audio_size    / 1024.0,
            subtitle_size / 1024.0,



More information about the ffmpeg-cvslog mailing list