aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/hls.c
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2017-12-25 11:33:06 -0800
committerAman Gupta <aman@tmm1.net>2017-12-26 14:48:13 -0800
commita232a72d77cf32766e7f42f892b983f5e496653f (patch)
tree365a1c2d8c530bb86fe49f0a0ad2021153a5283d /libavformat/hls.c
parent2f9ca64556cba9a7edcca9a1c55923a60022937d (diff)
downloadffmpeg-a232a72d77cf32766e7f42f892b983f5e496653f.tar.gz
avformat/hls: return AVERROR_PROTOCOL_NOT_FOUND when http protocol is not available
Fixes compile error when building with network or protocols disabled. This code would never be reached (because the demuxer fails much earlier on http playlists or segments), so it doesn't matter much what we do here as long as it compiles. Signed-off-by: Aman Gupta <aman@tmm1.net>
Diffstat (limited to 'libavformat/hls.c')
-rw-r--r--libavformat/hls.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/hls.c b/libavformat/hls.c
index d2cbb47f15..c0bade0e84 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,