1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00
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
..
cmdutils.c fftools: Fix preset search pathes 2022-07-08 13:58:49 +02:00
cmdutils.h fftools/cmdutils: split common option handlers into their own file 2022-03-22 18:49:43 +01: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
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
ffplay.c fftools/ffplay: fix YUV conversion mode 2022-06-27 12:17:59 +02:00
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 fftools/fopen_utf8: support long paths on Windows for fftools 2022-06-19 01:38:23 +03:00
Makefile fftools: add DPI awareness manifest 2022-08-13 14:42:52 +02:00
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: note D and T type streams for completeness. 2022-05-20 23:42:23 +05:30
opt_common.h fftools/cmdutils: split common option handlers into their own file 2022-03-22 18:49:43 +01:00
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