avformat/http: print error that causes reconnection
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 6 Sep 2015 17:39:24 +0000 (19:39 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 6 Sep 2015 18:43:38 +0000 (20:43 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/http.c

index 476b53b..dfe04ad 100644 (file)
@@ -1242,7 +1242,7 @@ static int http_read_stream(URLContext *h, uint8_t *buf, int size)
 #endif /* CONFIG_ZLIB */
     read_ret = http_buf_read(h, buf, size);
     if (read_ret < 0 && s->reconnect && !h->is_streamed && s->filesize > 0 && s->off < s->filesize) {
-        av_log(h, AV_LOG_INFO, "Will reconnect at %"PRId64".\n", s->off);
+        av_log(h, AV_LOG_INFO, "Will reconnect at %"PRId64" error=%s.\n", s->off, av_err2str(read_ret));
         seek_ret = http_seek_internal(h, s->off, SEEK_SET, 1);
         if (seek_ret != s->off) {
             av_log(h, AV_LOG_ERROR, "Failed to reconnect at %"PRId64".\n", s->off);