Commit 070d7173 authored by lucabe's avatar lucabe

Use recv() instead of recvfrom() (removes some other differences between

IPv4-only and protocol-independent code)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11015 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 54b9f0f1
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment