diff options
author | rogerdpack <rogerpack2005@gmail.com> | 2014-01-06 12:57:52 -0700 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-08 23:56:05 +0100 |
commit | 2be1e1b223d96564f9ec25067455ad5c26089ad1 (patch) | |
tree | 1b22ea46e9c69376ed89ebcc9c74bf4c14965799 /libavformat/udp.c | |
parent | 48ad1f392a0f702cdef521483447301abf6ddee3 (diff) | |
download | ffmpeg-2be1e1b223d96564f9ec25067455ad5c26089ad1.tar.gz |
avformat/udp: debug log udp socket size
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/udp.c')
-rw-r--r-- | libavformat/udp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/udp.c b/libavformat/udp.c index 047ff7c6d9..a61ac33e31 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -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); } |