[FFmpeg-devel] [PATCH 4/6] avformat: remove avio_flush() calls from the end of write_packet functions

Martin Storsjö martin at martin.st
Sun Jan 5 22:35:53 EET 2020


On Sun, 5 Jan 2020, Marton Balint wrote:

> Removing explicit avio_flush() calls helps us to buffer more data and avoid
> flushing the IO context too often which causes reduced IO throughput for
> non-streamed file output.
>
> The user can control flushing behaviour at the end of every packet using the
> -flush_packets option, the default typically means to flush unless a
> non-streamed file output is used.
>
> Therefore this change should have no adverse effect on streaming, even if it is
> assumed that a new packet has a clean buffer so small seekbacks within the
> output buffer work even when the IO context is not seekable.
>
> Signed-off-by: Marton Balint <cus at passwd.hu>
> ---
> libavformat/hashenc.c | 1 -
> libavformat/img2enc.c | 1 -
> libavformat/mxfenc.c  | 3 ---
> 3 files changed, 5 deletions(-)

Probably ok

// Martin



More information about the ffmpeg-devel mailing list