diff options
author | Y0J1G3N <43652659+Y0J1G3N@users.noreply.github.com> | 2023-06-18 22:47:26 +0800 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-09-11 18:24:03 +0200 |
commit | 97dc20278713ef66eb0201e2d3324935ea68daae (patch) | |
tree | b1aad9e3c5e38f0f34f98776313b0f5a10867619 /stream/stream_lavf.c | |
parent | 329d94af41dd02846a9879ca6a4019c0250ad1dd (diff) | |
download | mpv-97dc20278713ef66eb0201e2d3324935ea68daae.tar.bz2 mpv-97dc20278713ef66eb0201e2d3324935ea68daae.tar.xz |
stream: accept dav:// and davs:// urls
The GNOME Nautilus file manager supports browsing of dav:// and davs:// links only. Additionally, dav:// and davs:// are also types of webdav links. Therefore, adding an "or" operation to include support for dav:// and davs:// links.
Diffstat (limited to 'stream/stream_lavf.c')
-rw-r--r-- | stream/stream_lavf.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/stream/stream_lavf.c b/stream/stream_lavf.c index b99243448f..cfdae98137 100644 --- a/stream/stream_lavf.c +++ b/stream/stream_lavf.c @@ -285,16 +285,16 @@ static int open_f(stream_t *stream) } // Replace "mms://" with "mmsh://", so that most mms:// URLs just work. - // Replace "webdav://" with "http://" and "webdavs://" with "https://" + // Replace "dav://" or "webdav://" with "http://" and "davs://" or "webdavs://" with "https://" bstr b_filename = bstr0(filename); if (bstr_eatstart0(&b_filename, "mms://") || bstr_eatstart0(&b_filename, "mmshttp://")) { filename = talloc_asprintf(temp, "mmsh://%.*s", BSTR_P(b_filename)); - } else if (bstr_eatstart0(&b_filename, "webdav://")) + } else if (bstr_eatstart0(&b_filename, "dav://") || bstr_eatstart0(&b_filename, "webdav://")) { filename = talloc_asprintf(temp, "http://%.*s", BSTR_P(b_filename)); - } else if (bstr_eatstart0(&b_filename, "webdavs://")) + } else if (bstr_eatstart0(&b_filename, "davs://") || bstr_eatstart0(&b_filename, "webdavs://")) { filename = talloc_asprintf(temp, "https://%.*s", BSTR_P(b_filename)); } @@ -418,8 +418,8 @@ const stream_info_t stream_info_ffmpeg = { .protocols = (const char *const[]){ "rtmp", "rtsp", "rtsps", "http", "https", "mms", "mmst", "mmsh", "mmshttp", "rtp", "httpproxy", "rtmpe", "rtmps", "rtmpt", "rtmpte", "rtmpts", "srt", - "rist", "srtp", "gopher", "gophers", "data", "ipfs", "ipns", "webdav", - "webdavs", + "rist", "srtp", "gopher", "gophers", "data", "ipfs", "ipns", "dav", + "davs", "webdav", "webdavs", NULL }, .can_write = true, .stream_origin = STREAM_ORIGIN_NET, |