[FFmpeg-devel] [PATCH] IPv6 support for mingw32

Martin Storsjö martin
Wed Jan 6 13:25:25 CET 2010

Hi Zuxy,

On Wed, 6 Jan 2010, Zuxy Meng wrote:

> Without this patch mplayer build would fail but ffmpeg is fine,
> because currently ffmpeg's configure disables IPv6 on Windows.

Could you elaborate on how mplayer's build fails if ffmpeg is configured 
with IPv6 disabled?

> There's a tradeoff however, that the built binaries can't run on Windows 
> 2000 or older, as getaddrinfo() and freeaddrinfo() are available as part 
> of the OS since Windows XP. It's possible to run IPv6 on Windows 
> 2000/ME/98 with IPv6 Technology Preview installed but that requires 
> inclusion of wspiapi.h that isn't shipped in MinGW due to license 
> conflicts.

Skipping backwards compatibility for this kind of feature isn't something 
I'd do lighthandedly.

The common approach to preserve backwards compatibility (without losing 
the IPv6 functionality on the newer versions that actually have a proper 
getaddrinfo) on windows is to load them using GetProcAddress, and provide 
a fallback wrapper if they aren't found. Fallback wrappers already are 
provided in the "[PATCH/RFC] Prefer getaddrinfo over gethostbyname" 
thread, so adding support for loading the proper ones on top of those 
patches is quite easy. I can give that a try.

In that case, the ipv6 configure check could be simplified to only look 
for e.g. struct ipv6_mreq and other stuff related to multicast/ipv6 - or 
later provide fallbacks for those too and remove the ipv6 configure check 

As said, I can try to get proper IPv6 getaddrinfo for mingw - without 
breaking backwards compatibility. But in order to know what to aim at, I'd 
like to know what the build problem with mplayer actually is.

// Martin

More information about the ffmpeg-devel mailing list