diff mbox

[FFmpeg-devel,2/3] avformat/hls: return AVERROR_PROTOCOL_NOT_FOUND when http protocol is not available

Message ID 20171225193905.84024-2-ffmpeg@tmm1.net
State Accepted
Commit a232a72d77cf32766e7f42f892b983f5e496653f
Headers show

Commit Message

Aman Karmani Dec. 25, 2017, 7:39 p.m. UTC
From: Aman Gupta <aman@tmm1.net>

Signed-off-by: Aman Gupta <aman@tmm1.net>
---
 libavformat/hls.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/libavformat/hls.c b/libavformat/hls.c
index f00e22dfef..73bf55b791 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -611,6 +611,9 @@  static void update_options(char **dest, const char *name, void *src)
 static int open_url_keepalive(AVFormatContext *s, AVIOContext **pb,
                               const char *url)
 {
+#if !CONFIG_HTTP_PROTOCOL
+    return AVERROR_PROTOCOL_NOT_FOUND;
+#else
     int ret;
     URLContext *uc = ffio_geturlcontext(*pb);
     av_assert0(uc);
@@ -620,6 +623,7 @@  static int open_url_keepalive(AVFormatContext *s, AVIOContext **pb,
         ff_format_io_close(s, pb);
     }
     return ret;
+#endif
 }
 
 static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url,