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

Martin Storsjö martin at martin.st
Sun Jan 5 22:31:02 EET 2020


On Sun, 5 Jan 2020, Marton Balint wrote:

> The IO context is flushed by libavformat/mux.c after writing the header by calling
> avio_write_marker(s->pb, AV_NOPTS_VALUE, AVIO_DATA_MARKER_UNKNOWN), so this
> change should have no effect at all.
>
> Signed-off-by: Marton Balint <cus at passwd.hu>

If I read avio_write_marker correctly, it won't do an implicit flush on 
these calls unless the user actually has set the s->write_data_type 
function pointer - which only is set when used by direct API users.

So for normal cases, if I read it correctly, one can't assume 
avio_write_marker implies a flush in general.

// Martin



More information about the ffmpeg-devel mailing list