diff options
Diffstat (limited to 'libavformat/network.c')
-rw-r--r-- | libavformat/network.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/network.c b/libavformat/network.c index 0f5a575f77..c3d9f82551 100644 --- a/libavformat/network.c +++ b/libavformat/network.c @@ -180,7 +180,7 @@ static int ff_poll_interrupt(struct pollfd *p, nfds_t nfds, int timeout, return ret; } -int ff_socket(int af, int type, int proto) +int ff_socket(int af, int type, int proto, void *logctx) { int fd; @@ -193,14 +193,14 @@ int ff_socket(int af, int type, int proto) #if HAVE_FCNTL if (fd != -1) { if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) - av_log(NULL, AV_LOG_DEBUG, "Failed to set close on exec\n"); + av_log(logctx, AV_LOG_DEBUG, "Failed to set close on exec\n"); } #endif } #ifdef SO_NOSIGPIPE if (fd != -1) { if (setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &(int){1}, sizeof(int))) { - av_log(NULL, AV_LOG_WARNING, "setsockopt(SO_NOSIGPIPE) failed\n"); + av_log(logctx, AV_LOG_WARNING, "setsockopt(SO_NOSIGPIPE) failed\n"); } } #endif @@ -363,7 +363,7 @@ static int start_connect_attempt(struct ConnectionAttempt *attempt, *ptr = ai->ai_next; - attempt->fd = ff_socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); + attempt->fd = ff_socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol, h); if (attempt->fd < 0) return ff_neterrno(); attempt->deadline_us = av_gettime_relative() + timeout_ms * 1000; |