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

Aman Gupta ffmpeg at tmm1.net
Mon Dec 25 21:39:04 EET 2017


From: Aman Gupta <aman at tmm1.net>

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

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,
-- 
2.14.2



More information about the ffmpeg-devel mailing list