diff mbox series

[FFmpeg-devel] avformat/hls: Do not check protocol on hls without network.

Message ID 20211021140909.724-2-soekibun@gmail.com
State New
Headers show
Series [FFmpeg-devel] avformat/hls: Do not check protocol on hls without network.
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

ekibun Oct. 21, 2021, 2:09 p.m. UTC
---
 libavformat/hls.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 52a031ed..55fa831b 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -637,6 +637,7 @@  static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url,
     int ret;
     int is_http = 0;
 
+#if CONFIG_HTTP_PROTOCOL
     if (av_strstart(url, "crypto", NULL)) {
         if (url[6] == '+' || url[6] == ':')
             proto_name = avio_find_protocol_name(url + 7);
@@ -675,6 +676,7 @@  static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url,
         ;
     else if (strcmp(proto_name, "file") || !strncmp(url, "file,", 5))
         return AVERROR_INVALIDDATA;
+#endif
 
     av_dict_copy(&tmp, *opts, 0);
     av_dict_copy(&tmp, opts2, 0);