[FFmpeg-devel,v2,05/14] avformat/network: add logging context to log

Submitted by Steven Liu on Oct. 2, 2019, 6:58 a.m.

Details

Message ID 20191002065815.30333-5-lq@chinaffmpeg.org
State New
Headers show

Commit Message

Steven Liu Oct. 2, 2019, 6:58 a.m.
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
---
 libavformat/network.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/libavformat/network.c b/libavformat/network.c
index 5664455d18..0f5a575f77 100644
--- a/libavformat/network.c
+++ b/libavformat/network.c
@@ -238,7 +238,7 @@  int ff_accept(int fd, int timeout, URLContext *h)
     if (ret < 0)
         return ff_neterrno();
     if (ff_socket_nonblock(ret, 1) < 0)
-        av_log(NULL, AV_LOG_DEBUG, "ff_socket_nonblock failed\n");
+        av_log(h, AV_LOG_DEBUG, "ff_socket_nonblock failed\n");
 
     return ret;
 }
@@ -264,7 +264,7 @@  int ff_listen_connect(int fd, const struct sockaddr *addr,
     socklen_t optlen;
 
     if (ff_socket_nonblock(fd, 1) < 0)
-        av_log(NULL, AV_LOG_DEBUG, "ff_socket_nonblock failed\n");
+        av_log(h, AV_LOG_DEBUG, "ff_socket_nonblock failed\n");
 
     while ((ret = connect(fd, addr, addrlen))) {
         ret = ff_neterrno();