[FFmpeg-devel] [PATCH] Support standard file:// URLs

Nicolas George george at nsup.org
Tue Jul 27 17:48:03 EEST 2021


Our file: protocol bears the same name as the standard file: URL scheme,
but it is not compatible: when a file: URL contain special characters,
they are encoded with the standard %hh of URLs, but our protocol does
not take this into account. As a consequence, if a user copy-pastes a
file: URL from a browser or if an applications passes a file: URL
directly from Gtk+'s file chooser, it will fail as soon as there are
special characters in play.

This patch series tries to address that, in short, by renaming our file:
to fs: and introducing a more standards-compliant file: protocol.

In practice, it is done in several steps:

- Introduce fs: as a synonym to file:.

- Make sure everything works with fs: and make it the default.

- Have file: detect the // typical of standard URLs and switch to
  standard-compliant mode.

[PATCH 01/10] lavu/internal: add hex to int functions.
[PATCH 02/10] lavu/opt: use ff_hexpair2int().
[PATCH 03/10] lavfi: add fs protocol as synonym for file.
[PATCH 04/10] lavf: add fs to default_whitelist when file present.
[PATCH 05/10] lavf/avio: treat fs: the same way as file:.
[PATCH 06/10] fftools/ffmpeg_opt: treat fs: the same way as file:.
[PATCH 07/10] lavf/hls: treat fs: the same way as file:.
[PATCH 08/10] lavf/avio: use fs: by default instead of file:.
[PATCH 09/10] lavf/file: handle standard file:// URLs.
[PATCH 10/10] doc: document fs: and file: changes.

Regards,

-- 
  Nicolas George



More information about the ffmpeg-devel mailing list