]> git.sesse.net Git - ffmpeg/commit
avformat: convert some avio_flush() calls to avio_write_marker(AVIO_DATA_MARKER_FLUSH...
authorMarton Balint <cus@passwd.hu>
Fri, 27 Dec 2019 12:53:00 +0000 (13:53 +0100)
committerMarton Balint <cus@passwd.hu>
Tue, 7 Jan 2020 20:51:45 +0000 (21:51 +0100)
commit3414115cd4e1eac555ebd3e9658cb9ba3c5b246b
treec94e3af27e71e10e31e7ed87de1834f13249ad6e
parentf4a8ea7ff6fd83ec925cfd3fccde538196cff85a
avformat: convert some avio_flush() calls to avio_write_marker(AVIO_DATA_MARKER_FLUSH_POINT)

Converting 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 FLUSH_POINT flushing behaviour using the -flush_packets
option, the default typically means to flush unless a non-streamed file output
is used, so this change should have no adverse effect on streaming even if it
is assumed that after an avio_flush() the output buffer is clean so small
seekbacks within the output buffer will work even when the IO context is not
seekable.

Signed-off-by: Marton Balint <cus@passwd.hu>
libavformat/asfenc.c
libavformat/matroskaenc.c
libavformat/movenc.c
libavformat/mpegenc.c
libavformat/mxfenc.c
libavformat/oggenc.c