changeset 2742:c51f5ad5d131 libavformat

Use recv() instead of recvfrom() (removes some other differences between IPv4-only and protocol-independent code)
author lucabe
date Wed, 14 Nov 2007 07:56:20 +0000
parents 3c9be240de12
children a847a9eda9b2
files udp.c
diffstat 1 files changed, 1 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/udp.c	Wed Nov 14 07:45:15 2007 +0000
+++ b/udp.c	Wed Nov 14 07:56:20 2007 +0000
@@ -404,18 +404,10 @@
 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))