]> git.sesse.net Git - ffmpeg/commitdiff
http: avoid logging reconnect warning if stream was aborted
authorwm4 <nfxjfg@googlemail.com>
Thu, 4 Jan 2018 16:06:52 +0000 (17:06 +0100)
committerwm4 <nfxjfg@googlemail.com>
Thu, 4 Jan 2018 17:08:31 +0000 (18:08 +0100)
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.)

libavformat/http.c

index eb029e33a08b0b1fb8c088620e005f27ed87ac4e..4806b1e59b38fab8ceb3585f10fa11a56f495677 100644 (file)
@@ -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);