[FFmpeg-devel] [PATCH 09/10] lavf/file: handle standard file:// URLs.

Nicolas George george at nsup.org
Wed Jul 28 12:16:32 EEST 2021


Marton Balint (12021-07-27):
> You should mention the relevant rfc - RFC8089.

Locally added.

> Also there are a couple of common deviations/extensions from the normative
> standard, referenced in the RFC:
> 
> https://datatracker.ietf.org/doc/html/rfc8089#appendix-F
> 
> Do you plan to support those?

No. But at a quick glance, nothing is required to support them.

> Well, I guess this is needed for compatiblity, but as far as I see, the RFC
> supports the minimal repepresentation of local file path, so RFC-wise this
> is also valid. So what is the plan here? We will do unescaping and remove
> the deperecation message somewhere in the future?

I know the RFC accepts it, but honestly, semi-relative URLs, where the
scheme is specified, but then a relative path is used, do not make any
sense, especially for the file scheme but really for all schemes.

While standard absolute file:// URLs do happen quite easily (file
choosers can produce one; I had to implement a work-around in my
application), the odds that we meet a semi-relative one is zero.

On the other hand, we need backward compatibility. So I think reserving
this case for compatibility is completely ok.

> What about the file://host/file syntax which - at least on Windows - should
> be transformed to //host/file?

I do not intend to implement this, but if somebody wants to, the double
slash is still enough to distinguish from the compatibility case, so we
will be good.

> Also the question of relative resolution comes to mind, there is some code
> in libavformat/url.c which also handles file path specially, that should
> also be updated, right?

Good catch. I added this patch in the series. It passes FATE.

I will re-send the full series after giving more time for comments.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-lavf-url-handle-fs-and-compatibility-file.patch
Type: text/x-diff
Size: 1911 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210728/9b8ccbdb/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210728/9b8ccbdb/attachment.sig>


More information about the ffmpeg-devel mailing list