diff options
Diffstat (limited to 'libavformat/tcp.c')
-rw-r--r-- | libavformat/tcp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/tcp.c b/libavformat/tcp.c index 7e348f7729..e7c6210fc1 100644 --- a/libavformat/tcp.c +++ b/libavformat/tcp.c @@ -141,10 +141,12 @@ static int tcp_open(URLContext *h, const char *uri, int flags) optlen = sizeof(ret); getsockopt (fd, SOL_SOCKET, SO_ERROR, &ret, &optlen); if (ret != 0) { + char errbuf[100]; + ret = AVERROR(ret); + av_strerror(ret, errbuf, sizeof(errbuf)); av_log(h, AV_LOG_ERROR, "TCP connection to %s:%d failed: %s\n", - hostname, port, strerror(ret)); - ret = AVERROR(ret); + hostname, port, errbuf); goto fail; } } |