aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-12-16 11:10:58 +0100
committerAnton Khirnov <anton@khirnov.net>2022-05-24 13:46:57 +0200
commit3d4d3553752b34ff97ccc6e16e74b82524b0f404 (patch)
treef4019324187236cb429804d927e834cf572667da /fftools/ffmpeg.h
parent19d1e1fb065acc66b5cbfc664be67202a0b9c400 (diff)
downloadffmpeg-3d4d3553752b34ff97ccc6e16e74b82524b0f404.tar.gz
fftools/ffmpeg: stop using AVStream.nb_frames in do_video_stats()
Its use for muxing is not documented, in practice it is incremented per each packet successfully passed to the muxer's write_packet(). Since there is a lot of indirection between ffmpeg receiving a packet from the encoder and it actually being written (e.g. bitstream filters, the interleaving queue), using nb_frames here is incorrect. Add a new counter for packets received from encoder instead.
Diffstat (limited to 'fftools/ffmpeg.h')
-rw-r--r--fftools/ffmpeg.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index 9f0c093e34..7326193caf 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -551,6 +551,8 @@ typedef struct OutputStream {
// number of frames/samples sent to the encoder
uint64_t frames_encoded;
uint64_t samples_encoded;
+ // number of packets received from the encoder
+ uint64_t packets_encoded;
/* packet quality factor */
int quality;