summaryrefslogtreecommitdiff
path: root/libavformat/tcp.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2011-04-20 11:40:29 +0200
committerMartin Storsjö <martin@martin.st>2011-04-20 14:59:45 +0300
commitc60112f26873afafb55d24cc50a0e93ad9411373 (patch)
tree62d01be1c17198fe7593818536d1138821fc7ffd /libavformat/tcp.c
parent8408e1d7d69aad57e633c27a6bcd522a15fa3702 (diff)
libavformat: Make protocols pass URLContext as log context where available
Since the libavformat major bump, URLContext contains an AVClass, making it a usable log context. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/tcp.c')
-rw-r--r--libavformat/tcp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/tcp.c b/libavformat/tcp.c
index 0cb3ae3262..ced103876f 100644
--- a/libavformat/tcp.c
+++ b/libavformat/tcp.c
@@ -64,7 +64,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
snprintf(portstr, sizeof(portstr), "%d", port);
ret = getaddrinfo(hostname, portstr, &hints, &ai);
if (ret) {
- av_log(NULL, AV_LOG_ERROR,
+ av_log(h, AV_LOG_ERROR,
"Failed to resolve hostname %s: %s\n",
hostname, gai_strerror(ret));
return AVERROR(EIO);
@@ -119,7 +119,7 @@ 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) {
- av_log(NULL, AV_LOG_ERROR,
+ av_log(h, AV_LOG_ERROR,
"TCP connection to %s:%d failed: %s\n",
hostname, port, strerror(ret));
goto fail;