[FFmpeg-devel] [PATCH] Make RTP work with IPv6 enabled

Ronald S. Bultje rsbultje
Tue Oct 30 15:50:57 CET 2007


Hi,

On 10/30/07, Luca Abeni <lucabe72 at email.it> wrote:
>
> Ok, so I guess the key is:
>
> +    int family = AF_UNSPEC;
>
> -    res0 = udp_ipv6_resolve_host(0, s->local_port, SOCK_DGRAM, AF_UNSPEC,
> AI_PASSIVE);
> +    if (((struct sockaddr *) &s->dest_addr)->sa_family)
> +        family = ((struct sockaddr *) &s->dest_addr)->sa_family;
> +    res0 = udp_ipv6_resolve_host(0, s->local_port, SOCK_DGRAM, family,
> AI_PASSIVE);
>
> Right? I agree that this looks the correct thing to do, and I guess it
> should be committed.


Also the malloc->mallocz(), otherwise it is not initialized to zero and
random stuff may happen. The rest is not needed although it may be nice to
have it in as a separate patch...

[...]
> > Later, both (ff)server and client (ffplay) fail on the rtcp, which they
> both
> > bind() to and write data to, and that is what the changes in rtsp.c
> /rtpproto.c
> > are needed for (plus, again, the changes in udp.c).
> The changes in rtpproto.c only affect rtp_set_remote_url(), right?
> That function is only called in rtsp.c, right? And I do not see how it can
> be
> called without specifying the destination port...


Yes, correct, the rtpproto.c appears unneeded, sorry for that. Need a new
patch or will you commit as-is?

Ronald




More information about the ffmpeg-devel mailing list