[FFmpeg-devel] [PATCH] Enable proper IPv6 functions on windows

Martin Storsjö martin
Fri Jan 22 16:40:51 CET 2010


On Fri, 22 Jan 2010, Ronald S. Bultje wrote:

> > +    int (WSAAPI *win_getnameinfo)(const struct sockaddr *sa, socklen_t salen,
> > +                                  char *host, DWORD hostlen,
> > +                                  char *serv, DWORD servlen, int flags);
> > +    HMODULE ws2mod = GetModuleHandle("ws2_32.dll");
> > +    win_getnameinfo = GetProcAddress(ws2mod, "getnameinfo");
> > +    if (win_getnameinfo)
> > +        return win_getnameinfo(sa, salen, host, hostlen, serv, servlen, flags);
> 
> Sorry, I didn't follow the discussion very much...
> 
> Shouldn't the function pointer variable (in all functions) not be
> static? Now you load it every time which sounds like a huge
> time-waster to me. Otherwise looks ok to me.

I guess that would be ok, too. Theoretically, it wouldn't be totally 
thread safe, but for all practical matters I think it would be ok.

// Martin



More information about the ffmpeg-devel mailing list