]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/network.c
Voxware MetaSound decoder
[ffmpeg] / libavformat / network.c
index d8e6540b19d4bde39db6b08e3fc47a11982c3cb8..810a907212d8435d68e146c39f5b3990b19e54b1 100644 (file)
@@ -240,7 +240,8 @@ int ff_listen_bind(int fd, const struct sockaddr *addr,
 }
 
 int ff_listen_connect(int fd, const struct sockaddr *addr,
-                      socklen_t addrlen, int timeout, URLContext *h)
+                      socklen_t addrlen, int timeout, URLContext *h,
+                      int will_try_next)
 {
     struct pollfd p = {fd, POLLOUT, 0};
     int ret;
@@ -267,9 +268,13 @@ int ff_listen_connect(int fd, const struct sockaddr *addr,
                 char errbuf[100];
                 ret = AVERROR(ret);
                 av_strerror(ret, errbuf, sizeof(errbuf));
-                av_log(h, AV_LOG_ERROR,
-                       "Connection to %s failed: %s\n",
-                       h->filename, errbuf);
+                if (will_try_next)
+                    av_log(h, AV_LOG_WARNING,
+                           "Connection to %s failed (%s), trying next address\n",
+                           h->filename, errbuf);
+                else
+                    av_log(h, AV_LOG_ERROR, "Connection to %s failed: %s\n",
+                           h->filename, errbuf);
             }
         default:
             return ret;