[FFmpeg-devel] url_fopen creates IPv6 socket for url "rtp://localhost:XXX"
Fri Aug 13 15:41:25 CEST 2010
On Fri, 13 Aug 2010, Dominik Tomczak wrote:
> On Windows 7 Home Premium while using libavformat and opening url
> "rtp://localhost:XXXX" (XXXX is a port number) I can see that 2 UDP
> sockets are created but both are IPv6, not IPv4. Does anybody know why?
> I haven't specified IPv6 in URL. Is IPv6 a default IP version in FFMpeg
> on Windows 7?
You haven't specified anything IPv4-specific either. localhost resolves to
both 127.0.0.1 (for IPv4) and ::1 (for IPv6) and we choose the one the OS
returns first, which is out of our control. If you want to be sure of
which one you get, specify a numeric IP.
For connection-oriented protocols that use TCP, we try connecting on all
of them, one at a time, but for UDP, we can't really know which one the
So when in doubt, use a numerical IP with everything UDP-based.
More information about the ffmpeg-devel