1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-08 13:22:53 +02:00

udp: Allow specifying multicast include/blocks as host names as well

Previously this only allowed literal IP addresses. When these
are conveyed in a SDP file as in RFC4570, host names are allowed
as well.

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Ed Torbett 2013-07-26 21:54:29 +03:00 committed by Martin Storsjö
parent 0e8c6f221a
commit 3357bccc5c

View File

@ -181,7 +181,7 @@ static int udp_set_multicast_sources(int sockfd, struct sockaddr *addr,
int level = addr->sa_family == AF_INET ? IPPROTO_IP : IPPROTO_IPV6;
struct addrinfo *sourceaddr = udp_resolve_host(sources[i], 0,
SOCK_DGRAM, AF_UNSPEC,
AI_NUMERICHOST);
0);
if (!sourceaddr)
return AVERROR(ENOENT);
@ -211,7 +211,7 @@ static int udp_set_multicast_sources(int sockfd, struct sockaddr *addr,
struct ip_mreq_source mreqs;
struct addrinfo *sourceaddr = udp_resolve_host(sources[i], 0,
SOCK_DGRAM, AF_UNSPEC,
AI_NUMERICHOST);
0);
if (!sourceaddr)
return AVERROR(ENOENT);
if (sourceaddr->ai_addr->sa_family != AF_INET) {