@@ -646,7 +646,7 @@ static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url,
return AVERROR_INVALIDDATA;
// only http(s) & file are allowed
- if (av_strstart(proto_name, "file", NULL)) {
+ if (av_strstart(proto_name, "file", NULL) || av_strstart(proto_name, "fs", NULL)) {
if (strcmp(c->allowed_extensions, "ALL") && !av_match_ext(url, c->allowed_extensions)) {
av_log(s, AV_LOG_ERROR,
"Filename extension of \'%s\' is not a common multimedia extension, blocked for security reasons.\n"
@@ -667,8 +667,10 @@ static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url,
;
else if (av_strstart(url, "data", NULL) && !strncmp(proto_name, url + 5, strlen(proto_name)) && url[5 + strlen(proto_name)] == ':')
;
- else if (strcmp(proto_name, "file") || !strncmp(url, "file,", 5))
+ else if ((strcmp(proto_name, "file") && strcmp(proto_name, "fs")) ||
+ !strncmp(url, "file,", 5) || !strncmp(url, "fs,", 3)) {
return AVERROR_INVALIDDATA;
+ }
av_dict_copy(&tmp, *opts, 0);
av_dict_copy(&tmp, opts2, 0);
Signed-off-by: Nicolas George <george@nsup.org> --- libavformat/hls.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)