summaryrefslogtreecommitdiff
path: root/libavformat/hls.c
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2017-12-22 16:30:42 -0800
committerAman Gupta <aman@tmm1.net>2017-12-22 16:41:41 -0800
commit5f4a32a6e343d2683d90843506ecfc98cc7c8ed4 (patch)
treecf9bd8bc6c4cb2defda7c1829ac4448924c7c71e /libavformat/hls.c
parent54d0ef1738ff30c05e2edb5b019dbd44b694ebe6 (diff)
avformat/hls: hide misleading warning when http reconnect is required
AVERROR_EOF is an internal error which means the http socket is no longer valid for new requests. It informs the caller that a new connection must be established, and as such does not need to be surfaced to the user as a warning. Signed-off-by: Aman Gupta <aman@tmm1.net>
Diffstat (limited to 'libavformat/hls.c')
-rw-r--r--libavformat/hls.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 26bf61c805..f718f2e6c1 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -670,9 +670,10 @@ static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url,
if (ret == AVERROR_EXIT) {
return ret;
} else if (ret < 0) {
- av_log(s, AV_LOG_WARNING,
- "keepalive request failed for '%s', retrying with new connection: %s\n",
- url, av_err2str(ret));
+ if (ret != AVERROR_EOF)
+ av_log(s, AV_LOG_WARNING,
+ "keepalive request failed for '%s', retrying with new connection: %s\n",
+ url, av_err2str(ret));
ret = s->io_open(s, pb, url, AVIO_FLAG_READ, &tmp);
}
} else {
@@ -726,9 +727,10 @@ static int parse_playlist(HLSContext *c, const char *url,
if (ret == AVERROR_EXIT) {
return ret;
} else if (ret < 0) {
- av_log(c->ctx, AV_LOG_WARNING,
- "keepalive request failed for '%s', retrying with new connection: %s\n",
- url, av_err2str(ret));
+ if (ret != AVERROR_EOF)
+ av_log(c->ctx, AV_LOG_WARNING,
+ "keepalive request failed for '%s', retrying with new connection: %s\n",
+ url, av_err2str(ret));
in = NULL;
}
}