diff options
author | Marton Balint <cus@passwd.hu> | 2021-04-06 01:10:30 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2021-04-08 17:49:26 +0200 |
commit | 31d249a418409a0e295e74701040e8ef866847d1 (patch) | |
tree | b243cebe1b4e2c50dbe8737c0ea850930a26f754 /libavformat/url.c | |
parent | 51de6103e9c762f4ca528ffa030f978db6f5b72a (diff) | |
download | ffmpeg-31d249a418409a0e295e74701040e8ef866847d1.tar.gz |
avformat/url: add ff_make_absolulte_url2 to be able to test windows path cases
Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit fb4da90fecdefa2508618ca835cd0250be940e04)
Diffstat (limited to 'libavformat/url.c')
-rw-r--r-- | libavformat/url.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libavformat/url.c b/libavformat/url.c index 222d7d8a10..f53fdf59d8 100644 --- a/libavformat/url.c +++ b/libavformat/url.c @@ -190,8 +190,8 @@ static int append_path(char *root, char *out_end, char **rout, return 0; } -int ff_make_absolute_url(char *buf, int size, const char *base, - const char *rel) +int ff_make_absolute_url2(char *buf, int size, const char *base, + const char *rel, int handle_dos_paths) { URLComponents ub, uc; char *out, *out_end, *path; @@ -224,7 +224,7 @@ int ff_make_absolute_url(char *buf, int size, const char *base, if (!base) base = ""; - if (HAVE_DOS_PATHS) { + if (handle_dos_paths) { if ((ret = ff_url_decompose(&ub, base, NULL)) < 0) goto error; if (is_fq_dos_path(base) || av_strstart(base, "file:", NULL) || ub.path == ub.url) { @@ -316,6 +316,12 @@ error: return ret; } +int ff_make_absolute_url(char *buf, int size, const char *base, + const char *rel) +{ + return ff_make_absolute_url2(buf, size, base, rel, HAVE_DOS_PATHS); +} + AVIODirEntry *ff_alloc_dir_entry(void) { AVIODirEntry *entry = av_mallocz(sizeof(AVIODirEntry)); |