[FFmpeg-devel] [PATCH] avformat/cache - delete cache file after closing handle

Gyan ffmpeg at gyani.pro
Thu May 23 22:23:53 EEST 2019



On 23-05-2019 11:20 PM, Nicolas George wrote:
> Gyan (12019-05-23):
>> -    unlink(buffername);
>> -    av_freep(&buffername);
>> +    ret = avpriv_io_delete(buffername);
> Is there a reason you replace unlink() with avpriv_io_delete()? unlink()
> is more direct, and cache does not support non-file cache.

avpriv_io_delete will call the file protocol's delete which is guarded with a header check, not done here. Since we now have a generic wrapper function, isn't that better for future maintenance? The unlink call was added in 2011, the wrapper in 2015.

Gyan



More information about the ffmpeg-devel mailing list