[FFmpeg-devel] [PATCH] lavf/dashenc: Fix file URI handling when deleting files.

Andrey Semashev andrey.semashev at gmail.com
Thu Nov 29 13:17:45 EET 2018

On 11/29/18 2:15 PM, Andrey Semashev wrote:
> On 11/28/18 7:47 PM, Jeyapal, Karthick wrote:
>> On 11/28/18 4:46 PM, Andrey Semashev wrote:
>>> The URI used to open the output streams may be an actual URI with 
>>> "file" scheme,
>>> according to https://tools.ietf.org/html/rfc8089. This commit makes file
>>> deletion routine recognize file URIs and extract the actual 
>>> filesystem path
>>> from it.
>> There is already some code in ffmpeg to handle this. It is present in 
>> file_delete() function in file.c.
>> We will need to avoid code duplication for the same functionality. One 
>> option could be to call avpriv_io_delete() function instead of calling 
>> unlink, so that file_delete function gets called.
>> Calling avpriv_io_delete will also make the delete functionality 
>> easily extendable for other output protocols.
> That would be fine with me, but I'm using Linux. Looking at file_delete 
> (in libavformat/file.c), it looks like it will only work on POSIX 
> systems but not on Windows, since it doesn't have unistd.h. Am I 
> correct? And if so, is avpriv_io_delete still the preferred approach?

Also, that code doesn't seem to support the URI with an authority field 
and doesn't check the special "localhost" case.

More information about the ffmpeg-devel mailing list