ffmpeg/fftools
Anton Khirnov 4fce3bab64 fftools/ffmpeg: use a separate counter for encoded packet data size
update_video_stats() currently uses OutputStream.data_size to print the
total size of the encoded stream so far and the average bitrate.
However, that field is updated in the muxer thread, right before the
packet is sent to the muxer. Not only is this racy, but the numbers may
not match even if muxing was in the main thread due to bitstream
filters, filesize limiting, etc.

Introduce a new counter, data_size_enc, for total size of the packets
received from the encoder and use that in update_video_stats(). Rename
data_size to data_size_mux to indicate its semantics more clearly.

No synchronization is needed for data_size_mux, because it is only read
in the main thread in print_final_stats(), which runs after the muxer
threads are terminated.
2022-08-29 15:42:11 +02:00
..
Makefile fftools: add DPI awareness manifest 2022-08-13 14:42:52 +02:00
cmdutils.c
cmdutils.h
ffmpeg.c fftools/ffmpeg: use a separate counter for encoded packet data size 2022-08-29 15:42:11 +02:00
ffmpeg.h fftools/ffmpeg: use a separate counter for encoded packet data size 2022-08-29 15:42:11 +02:00
ffmpeg_demux.c fftools/ffmpeg: stop accessing av_stream_get_parser() from the main thread 2022-08-29 15:42:11 +02:00
ffmpeg_filter.c fftools/ffmpeg: drop OutputStream.enc 2022-08-29 15:42:11 +02:00
ffmpeg_hw.c fftools/ffmpeg: drop OutputStream.enc 2022-08-29 15:42:11 +02:00
ffmpeg_mux.c fftools/ffmpeg: use a separate counter for encoded packet data size 2022-08-29 15:42:11 +02:00
ffmpeg_opt.c fftools/ffmpeg: drop OutputStream.fps_mode 2022-08-29 15:42:11 +02:00
ffplay.c
ffprobe.c ffprobe: restore reporting error code for failed inputs 2022-08-17 16:46:05 +05:30
fftools.manifest fftools: add DPI awareness manifest 2022-08-13 14:42:52 +02:00
fftoolsres.rc fftools: add DPI awareness manifest 2022-08-13 14:42:52 +02:00
fopen_utf8.h
objpool.c fftools/objpool: Don't use return with expression when returning void 2022-07-23 18:58:35 +02:00
objpool.h fftools: add an object pool 2022-07-23 11:53:19 +02:00
opt_common.c
opt_common.h
sync_queue.c fftools/ffmpeg: replace AVFrame.pkt_duration with duration 2022-07-24 08:46:16 +02:00
sync_queue.h fftools/ffmpeg: use the sync queues to handle -frames 2022-07-23 11:53:19 +02:00
thread_queue.c fftools: add a multistream thread-safe queue 2022-07-23 11:53:19 +02:00
thread_queue.h fftools: add a multistream thread-safe queue 2022-07-23 11:53:19 +02:00