avformat/udp: debug log udp socket size

Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
rogerdpack 2014-01-06 12:57:52 -07:00 committed by Michael Niedermayer
parent 48ad1f392a
commit 2be1e1b223
1 changed files with 6 additions and 0 deletions

View File

@ -701,6 +701,12 @@ static int udp_open(URLContext *h, const char *uri, int flags)
if (setsockopt(udp_fd, SOL_SOCKET, SO_RCVBUF, &tmp, sizeof(tmp)) < 0) {
log_net_error(h, AV_LOG_WARNING, "setsockopt(SO_RECVBUF)");
}
len = sizeof(tmp);
if (getsockopt(udp_fd, SOL_SOCKET, SO_RCVBUF, &tmp, &len) < 0) {
log_net_error(h, AV_LOG_WARNING, "getsockopt(SO_RCVBUF)");
} else
av_log(h, AV_LOG_DEBUG, "end receive buffer size reported is %d\n", tmp);
/* make the socket non-blocking */
ff_socket_nonblock(udp_fd, 1);
}