[FFmpeg-devel] [PATCH 1/2] lavf/file: Add proper support for authority in file URIs.

Andrey Semashev andrey.semashev at gmail.com
Thu Nov 29 20:42:53 EET 2018


On 11/29/18 9:24 PM, Nicolas George wrote:
> Andrey Semashev (2018-11-29):
>> Previously, URIs with authority field were incorrectly interpreted as if
>> the authority was part of the path.
> 
> The "file:" prefix does not indicate a file:// URI but a path for the
> file: protocol of FFmpeg.

It does. avformat_open_input, avio_open and ffurl_open[_whitelist] docs 
all say it's an URL and they don't perform any conversion. So the file 
backend should be prepared to receive a URL, with a scheme and authority.

> You can check by yourself that they are not URIs by trying to get FFmpeg
> to open file:///dev/nul%6c for example.

It will probably currently fail because of the escape sequence. But even 
if it weren't for this reason, it would still be interpreting the URI 
the wrong way because of the authority part, which is what this patch fixes.

Escape sequences, if needed, can be fixed separately.


More information about the ffmpeg-devel mailing list