Commit a232a72d authored by Aman Gupta's avatar Aman Gupta

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: 's avatarAman Gupta <aman@tmm1.net>
parent 2f9ca645
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment