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

Ronald S. Bultje rsbultje
Tue Oct 30 14:58:22 CET 2007

Hi Luca,

On 10/30/07, Luca Abeni <lucabe72 at email.it> wrote:
> > With this patch, I can stream rtp/udp from ffserver.
> Arg... My head is spinning again :(
> The changes discussed in this email should affect the rtsp demuxer, not
> ffserver (ffserver always specify a remote host when opening rtp://
> URLs)...

Both. make your head spin a bit more:

With this patch, udp.c takes the target family in account when determining
the family of the local host address (see the changes in udp.c) that it
bind()s to. That is a change for both client and server.

Ffserver would previously bind() to the socket based on the local address
family, even if the target that it sends data to is from a different family.
Because of this, on my computer at least, the sendto() would fail because
the dest_addr did not have the same family (PF_INET) as the local host
(PF_INET6) as returned by getaddrinfo(). This patch fixes it by taking the
target address family into account when setting up the socket with the local
address that we bind() to (hints.ai_family in the argument to getaddrinfo();
those are the changes in udp.c).

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).


More information about the ffmpeg-devel mailing list