[FFmpeg-cvslog] avformat/udp: debug log udp socket size

rogerdpack git at videolan.org
Wed Jan 8 23:56:55 CET 2014


ffmpeg | branch: master | rogerdpack <rogerpack2005 at gmail.com> | Mon Jan  6 12:57:52 2014 -0700| [2be1e1b223d96564f9ec25067455ad5c26089ad1] | committer: Michael Niedermayer

avformat/udp: debug log udp socket size

Signed-off-by: rogerdpack <rogerpack2005 at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2be1e1b223d96564f9ec25067455ad5c26089ad1
---

 libavformat/udp.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavformat/udp.c b/libavformat/udp.c
index 047ff7c..a61ac33 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);
     }



More information about the ffmpeg-cvslog mailing list