diff options
author | Anton Khirnov <anton@khirnov.net> | 2022-03-31 13:58:28 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-07-23 11:53:19 +0200 |
commit | 4cd19eaffa1fba01a7e8622a0f47f210ca4e8bcf (patch) | |
tree | 83147b1a2f9e255f7932dc035038eeae87656ff8 | |
parent | 587081a1794a1f95c80c9967df135d3eb08fd17f (diff) |
fftools/ffmpeg: stop using OutputStream.frame_number in print_report()
This field means different things when the video is encoded (number of
frames emitted to the encoding sync queue/encoder by the video sync
code) or copied (number of packets sent to the muxer sync queue).
Print the value of packets_written instead, which means the same thing
in both cases. It is also more accurate, since packets may be dropped by
the sync queue or bitstream filters.
-rw-r--r-- | fftools/ffmpeg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 8ab8aee711..b512eb5a19 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -1595,7 +1595,7 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti } if (!vid && enc->codec_type == AVMEDIA_TYPE_VIDEO) { float fps; - int64_t frame_number = ost->frame_number; + uint64_t frame_number = ost->packets_written; fps = t > 1 ? frame_number / t : 0; av_bprintf(&buf, "frame=%5"PRId64" fps=%3.*f q=%3.1f ", |