fix --disable-network compipling error

Signed-off-by: Steven Liu <l...@chinaffmpeg.org>
---
 libavformat/hls.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index f00e22dfef..51d83b7557 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -611,14 +611,16 @@ static void update_options(char **dest, const char *name, 
void *src)
 static int open_url_keepalive(AVFormatContext *s, AVIOContext **pb,
                               const char *url)
 {
-    int ret;
+    int ret = 0;
     URLContext *uc = ffio_geturlcontext(*pb);
     av_assert0(uc);
     (*pb)->eof_reached = 0;
+#if CONFIG_HTTP_PROTOCOL
     ret = ff_http_do_new_request(uc, url);
     if (ret < 0) {
         ff_format_io_close(s, pb);
     }
+#endif
     return ret;
 }
 
-- 
2.14.3 (Apple Git-98)



_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to