[FFmpeg-devel] [PATCH][RFC] -std=c99
Tue Aug 19 04:03:35 CEST 2008
On Tue, Aug 19, 2008 at 01:38:14AM +0100, M?ns Rullg?rd wrote:
> > libavformat/udp.c: In function 'udp_join_multicast_group':
> > libavformat/udp.c:83: error: storage size of 'mreq' isn't known
> > libavformat/udp.c:83: warning: unused variable 'mreq'
> > libavformat/udp.c: In function 'udp_leave_multicast_group':
> > libavformat/udp.c:111: error: storage size of 'mreq' isn't known
> The problem is that this struct is not defined by any standard, to the
> best of my knowledge and googling. Does anyone know a standardised
> way of doing whatever this code does?
The UNIX standard includes IPv6 multicast, so in theory you could use
getaddrinfo() to map the IPv4 address to IPv6, and then use the
standardized IPv6 multicast operations on it. Granted, this assumes
those particular operations actually work on mapped addresses, and of
course this would break any system that doesn't have the IPv6 API.
>From a standards viewpoint, note also that the IPv6 code in the same
function uses the IPV6_ADD_MEMBERSHIP socket option, but UNIX chose to
call it IPV6_JOIN_GROUP instead (Linux #defines both, with the same
value). So there's a couple of other things that might need to be
tweaked if anyone wants to bring this fully in line with the spec.
More information about the ffmpeg-devel