[FFmpeg-devel] [PATCH/RFC] Prefer getaddrinfo over gethostbyname

Ronald S. Bultje rsbultje
Mon Jan 11 21:05:08 CET 2010

Hi Martin,

On Mon, Jan 11, 2010 at 2:45 PM, Martin Storsj? <martin at martin.st> wrote:
> Agh, I thought I checked that none of the uses of sockaddr_storage
> actually used its fields. (Instead of checking ->ss_family, one can cast
> it to (struct sockaddr *) and check ->sa_family instead.) But apparently I
> missed this one.
> The other option would be to avoid accessing the ss_family field - by
> redefining the parameter to is_multicast_address to be struct sockaddr
> insted, and use ->sa_family.

That's fine with me, if Luca is OK with it.

> Well, actually, udp.c defines some kind of fallback for
> IN6_IS_ADDR_MULTICAST at the start of the file, but this might be a good
> idea anyway.

Problem is, we don't know if sockaddr_in6 exists at all. Better leave
it out if we're not sure.


More information about the ffmpeg-devel mailing list