diff options
author | Martin Storsjö <martin@martin.st> | 2011-04-20 11:40:29 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2011-04-20 14:59:45 +0300 |
commit | c60112f26873afafb55d24cc50a0e93ad9411373 (patch) | |
tree | 62d01be1c17198fe7593818536d1138821fc7ffd /libavformat/udp.c | |
parent | 8408e1d7d69aad57e633c27a6bcd522a15fa3702 (diff) | |
download | ffmpeg-c60112f26873afafb55d24cc50a0e93ad9411373.tar.gz |
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/udp.c')
-rw-r--r-- | libavformat/udp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/udp.c b/libavformat/udp.c index 76e3f1a4a2..932eb19c2d 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -266,7 +266,7 @@ int ff_udp_set_remote_url(URLContext *h, const char *uri) if (connect(s->udp_fd, (struct sockaddr *) &s->dest_addr, s->dest_addr_len)) { s->is_connected = 0; - av_log(NULL, AV_LOG_ERROR, "connect: %s\n", strerror(errno)); + av_log(h, AV_LOG_ERROR, "connect: %s\n", strerror(errno)); return AVERROR(EIO); } } @@ -410,7 +410,7 @@ static int udp_open(URLContext *h, const char *uri, int flags) /* limit the tx buf size to limit latency */ tmp = s->buffer_size; if (setsockopt(udp_fd, SOL_SOCKET, SO_SNDBUF, &tmp, sizeof(tmp)) < 0) { - av_log(NULL, AV_LOG_ERROR, "setsockopt(SO_SNDBUF): %s\n", strerror(errno)); + av_log(h, AV_LOG_ERROR, "setsockopt(SO_SNDBUF): %s\n", strerror(errno)); goto fail; } } else { @@ -418,14 +418,14 @@ static int udp_open(URLContext *h, const char *uri, int flags) * avoid losing data on OSes that set this too low by default. */ tmp = s->buffer_size; if (setsockopt(udp_fd, SOL_SOCKET, SO_RCVBUF, &tmp, sizeof(tmp)) < 0) { - av_log(NULL, AV_LOG_WARNING, "setsockopt(SO_RECVBUF): %s\n", strerror(errno)); + av_log(h, AV_LOG_WARNING, "setsockopt(SO_RECVBUF): %s\n", strerror(errno)); } /* make the socket non-blocking */ ff_socket_nonblock(udp_fd, 1); } if (s->is_connected) { if (connect(udp_fd, (struct sockaddr *) &s->dest_addr, s->dest_addr_len)) { - av_log(NULL, AV_LOG_ERROR, "connect: %s\n", strerror(errno)); + av_log(h, AV_LOG_ERROR, "connect: %s\n", strerror(errno)); goto fail; } } |