summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2018-01-04 17:06:52 +0100
committerwm4 <nfxjfg@googlemail.com>2018-01-04 18:08:31 +0100
commit2477bfe22121f04eff9e4ba2475f1f999c17ea36 (patch)
treeb42472f9e572c5b229ac76de01c2d81fad461d67
parent18fbfd7bf86effb49c0341b37b9c1d73940d688e (diff)
http: avoid logging reconnect warning if stream was aborted
If the stream was aborted using the libavformat interrupt callback, we don't want it to log the reconnect warning. (Exiting after logging this warning worked well, so this is only for avoiding the ugly warning.)
-rw-r--r--libavformat/http.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/http.c b/libavformat/http.c
index eb029e33a0..4806b1e59b 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -1452,6 +1452,9 @@ static int http_read_stream(URLContext *h, uint8_t *buf, int size)
|| (read_ret == AVERROR_EOF && s->reconnect_at_eof && (!h->is_streamed || s->reconnect_streamed))) {
uint64_t target = h->is_streamed ? 0 : s->off;
+ if (read_ret == AVERROR_EXIT)
+ return read_ret;
+
if (reconnect_delay > s->reconnect_delay_max)
return AVERROR(EIO);