mpv/demux
Nick Sarnie c2a7c37b76
vobsub: fix loading with url and non-ascii path
When dragging a vobsub idx file onto the mpv window, the file will be a URL, such as file:///path/to/subs.idx

mpv then tries to guess the corressponding vobsub sub file for that idx file, and then passes that guess to ffmpeg.

ffmpeg then internally removes the file:// prefix and does a open() call.

The problem occurs if the URL contains non-ASCII characters where we see percent encoding. The URL is not decoded and passed to ffmpeg directly,
so ffmpeg tries to open /path/to/%E5%A4%A9/subs.sub which obviously doesn't exist.

The idx file works becuase we decode that somewhere else before passing to ffmpeg.

If we know the vobsub idx file path is a URL, update the filename we use for the vobsub sub file guess to use the decoded path to the vobsub idx file

Signed-off-by: Nick Sarnie <sarnex@gentoo.org>
2022-11-13 16:50:24 -05:00
..
cache.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
cache.h demux: add a on-disk cache 2019-09-19 20:37:05 +02:00
codec_tags.c demux/codec_tags: support more WAVEFORMATEXTENSIBLE tags 2022-11-01 09:52:27 -04:00
codec_tags.h
cue.c cue: tolerate NBSP as whitespace 2020-02-03 19:13:44 +01:00
cue.h
demux.c demux: stop iterating over demuxers as soon as a match is found 2022-05-21 23:32:40 +03:00
demux.h demux: Move demuxer help to new standard mechanism 2021-03-28 19:46:32 +03:00
demux_cue.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
demux_disc.c stream, demux: redo origin policy thing 2019-12-20 13:00:39 +01:00
demux_edl.c edl: add a way to add tags 2021-05-11 22:18:40 +02:00
demux_lavf.c vobsub: fix loading with url and non-ascii path 2022-11-13 16:50:24 -05:00
demux_libarchive.c stream_libarchive: remember archive headers from initial open 2020-04-28 22:13:03 -07:00
demux_mf.c demux_mf: add support for QOI, PHM and HDR images 2022-10-15 21:31:43 +03:00
demux_mkv.c demux_mkv: add AVS2 and AVS3 to tag list 2022-10-21 18:12:08 +03:00
demux_mkv_timeline.c demux_mkv: warn against some other aspects of mismatching codec data 2020-08-16 01:00:29 +02:00
demux_null.c demux_null: mark as seekable 2018-01-06 14:42:22 -08:00
demux_playlist.c demux_playlist: extend maximum line size (again) to 2M 2021-09-06 10:16:25 +03:00
demux_raw.c options: cleanup .min use for OPT_CHANNELS 2020-04-09 11:27:38 +02:00
demux_timeline.c player: add track-list/N/image sub-property 2021-10-14 15:39:07 +00:00
ebml.c demux_edl: rename ebml_defs.c to ebml_defs.inc 2021-11-14 19:13:10 +00:00
ebml.h build: change filenames of generated files 2020-06-04 16:59:05 +02:00
matroska.h
packet.c demux/packet: replace deprecated av_init_packet() 2022-01-10 22:56:52 +01:00
packet.h demux: add a on-disk cache 2019-09-19 20:37:05 +02:00
stheader.h player: add track-list/N/image sub-property 2021-10-14 15:39:07 +00:00
timeline.c stream, demux: redo origin policy thing 2019-12-20 13:00:39 +01:00
timeline.h edl: make it possible to delay-load files with multiple tracks 2020-02-21 00:19:17 +01:00