[FFmpeg-devel] [PATCH v2 4/5] avformat: introduce AVFormatContext io_close2 which returns an int

Marton Balint cus at passwd.hu
Sat Dec 4 22:12:49 EET 2021



On Sat, 4 Dec 2021, Hendrik Leppkes wrote:

> On Sat, Dec 4, 2021 at 9:00 PM Marton Balint <cus at passwd.hu> wrote:
>>
>> Otherwise there is no way to detect any error during avio_close().
>>
>
> Returning errors is nice and all, but whats the expected reaction to
> an error here, since we're already trying to close? Can't exactly
> close and go home (since thats what you just tried) like you would on
> an error to open.

It is probably not very useful for the read case, it is paramount however 
for the write case. To be sure you successfully wrote your data you need 
to check the return status.

Regards,
Marton


More information about the ffmpeg-devel mailing list