summaryrefslogtreecommitdiff
path: root/libavformat/udp.c
diff options
context:
space:
mode:
authorLuca Abeni <lucabe72@email.it>2007-11-14 07:56:20 +0000
committerLuca Abeni <lucabe72@email.it>2007-11-14 07:56:20 +0000
commit4c7d5764a03edc11583a4dc0d73a26612c3250cd (patch)
treea0f198179af9f76c0340e317301a1524fa81c7b6 /libavformat/udp.c
parent66c49825da10449a1d6c0e4cc4608523ff82c0ba (diff)
Use recv() instead of recvfrom() (removes some other differences between
IPv4-only and protocol-independent code) Originally committed as revision 11015 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/udp.c')
-rw-r--r--libavformat/udp.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/libavformat/udp.c b/libavformat/udp.c
index 65bd0a0ed3..2c40415a1c 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -404,18 +404,10 @@ static int udp_open(URLContext *h, const char *uri, int flags)
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))