[FFmpeg-devel] [PATCH] fftools/ffmpeg: use correct unit prefix symbol for binary scaled byte values
王昊然
msl0000023508 at gmail.com
Mon Jan 29 09:54:27 EET 2024
Fix bug #10501
Signed-off-by: WHR <msl0000023508 at gmail.com>
---
fftools/ffmpeg.c | 4 ++--
fftools/ffmpeg_enc.c | 2 +-
fftools/ffmpeg_mux.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
-------------- next part --------------
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 53df200d1ab..035210a8e90 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 2a7fba0c51f..bc0d3a334d7 100644
--- a/fftools/ffmpeg_enc.c
+++ b/fftools/ffmpeg_enc.c
@@ -612,7 +612,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 ab86abee14f..ee708267c1e 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-devel
mailing list