[FFmpeg-devel] [PATCH 2/6] avformat: remove uneeded avio_flush() calls from the end of write_header functions
Marton Balint
cus at passwd.hu
Tue Jan 7 23:21:19 EET 2020
On Mon, 6 Jan 2020, Martin Storsjö wrote:
> On Mon, 6 Jan 2020, Marton Balint wrote:
>
>>
>>
>> On Sun, 5 Jan 2020, Martin Storsjö wrote:
>>
>>> 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.
>>
>> Yes, you are right, I missed that too... I believe the patch is still
>> correct if I fix the commit message:
>>
>> avformat: remove avio_flush() calls from the end of write_header functions
>
> Hmm, yes, with that reasoning I think it is ok.
Thanks for your reviews, I have pushed the series.
Regards,
Marton
More information about the ffmpeg-devel
mailing list