[FFmpeg-cvslog] r11015 - trunk/libavformat/udp.c

lucabe subversion
Wed Nov 14 08:56:21 CET 2007


Author: lucabe
Date: Wed Nov 14 08:56:20 2007
New Revision: 11015

Log:
Use recv() instead of recvfrom() (removes some other differences between
IPv4-only and protocol-independent code)


Modified:
   trunk/libavformat/udp.c

Modified: trunk/libavformat/udp.c
==============================================================================
--- trunk/libavformat/udp.c	(original)
+++ trunk/libavformat/udp.c	Wed Nov 14 08:56:20 2007
@@ -404,18 +404,10 @@ static int udp_open(URLContext *h, const
 static int udp_read(URLContext *h, uint8_t *buf, int size)
 {
     UDPContext *s = h->priv_data;
-#ifndef CONFIG_IPV6
-    struct sockaddr_in from;
-#else
-    struct sockaddr_storage from;
-#endif
-    socklen_t from_len;
     int len;
 
     for(;;) {
-        from_len = sizeof(from);
-        len = recvfrom (s->udp_fd, buf, size, 0,
-                        (struct sockaddr *)&from, &from_len);
+        len = recv(s->udp_fd, buf, size, 0);
         if (len < 0) {
             if (ff_neterrno() != FF_NETERROR(EAGAIN) &&
                 ff_neterrno() != FF_NETERROR(EINTR))




More information about the ffmpeg-cvslog mailing list