diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-03-28 11:24:42 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-04-13 15:11:56 +0200 |
commit | 0288951174ba60b413dea720427c2b06dced9b73 (patch) | |
tree | 025b8250bc8a60d9b5c76419b7d403f437e0288f /fftools | |
parent | 37b118096ae278f8123bc918a283e7ff6f0611a9 (diff) | |
download | ffmpeg-0288951174ba60b413dea720427c2b06dced9b73.tar.gz |
fftools/ffmpeg_mux: make data_size_mux private to ffmpeg_mux
It is no longer used outside of this file.
Diffstat (limited to 'fftools')
-rw-r--r-- | fftools/ffmpeg.h | 2 | ||||
-rw-r--r-- | fftools/ffmpeg_mux.c | 5 | ||||
-rw-r--r-- | fftools/ffmpeg_mux.h | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index ddfeeabf75..bbcbf1aa80 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -649,8 +649,6 @@ typedef struct OutputStream { int keep_pix_fmt; /* stats */ - // combined size of all the packets sent to the muxer - uint64_t data_size_mux; // combined size of all the packets received from the encoder uint64_t data_size_enc; // number of packets send to the muxer diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index 01a11117a9..b316925115 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -128,7 +128,7 @@ static int write_packet(Muxer *mux, OutputStream *ost, AVPacket *pkt) } ms->last_mux_dts = pkt->dts; - ost->data_size_mux += pkt->size; + ms->data_size_mux += pkt->size; frame_num = atomic_fetch_add(&ost->packets_written, 1); pkt->stream_index = ost->index; @@ -652,9 +652,10 @@ static void mux_final_stats(Muxer *mux) for (int j = 0; j < of->nb_streams; j++) { OutputStream *ost = of->streams[j]; + MuxStream *ms = ms_from_ost(ost); const AVCodecParameters *par = ost->st->codecpar; const enum AVMediaType type = par->codec_type; - const uint64_t s = ost->data_size_mux; + const uint64_t s = ms->data_size_mux; switch (type) { case AVMEDIA_TYPE_VIDEO: video_size += s; break; diff --git a/fftools/ffmpeg_mux.h b/fftools/ffmpeg_mux.h index c76dc2e524..3fab74b2ed 100644 --- a/fftools/ffmpeg_mux.h +++ b/fftools/ffmpeg_mux.h @@ -63,6 +63,9 @@ typedef struct MuxStream { /* dts of the last packet sent to the muxer, in the stream timebase * used for making up missing dts values */ int64_t last_mux_dts; + + // combined size of all the packets sent to the muxer + uint64_t data_size_mux; } MuxStream; typedef struct Muxer { |