[FFmpeg-devel] [PATCH] ffmpeg: add 100ms delay for first stats
Nicolas George
george at nsup.org
Wed Dec 23 12:33:49 EET 2020
Gyan Doshi (12020-12-23):
> It's void av_dump_format(...)
>
> Seems too trivial to change it , or add + initialize yet another global
> variable just for this.
Exactly. Dumping the output is a global affair, it can warrant a global
variable. Something like this:
of->header_written = 1;
av_dump_format(of->ctx, file_index, of->ctx->url, 1);
+ output_dumped++;
...
+ if (output_dumped >= nb_output_files) {
...
+ }
That way, the initial stat is printed as early as possible, but will not
mangle the dump. And if the dump is very late, it is acceptable to have
the 500ms timeout too:
+ if (output_dumped >= nb_output_files || blah >= 500000) {
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20201223/7a1b7225/attachment.sig>
More information about the ffmpeg-devel
mailing list