Revision 1642cb6b libavformat/network.h

View differences:

libavformat/network.h
44 44

  
45 45
int ff_socket_nonblock(int socket, int enable);
46 46

  
47
static inline int ff_network_init(void)
48
{
49
#ifdef HAVE_WINSOCK2_H
50
    WSADATA wsaData;
51
    if (WSAStartup(MAKEWORD(1,1), &wsaData))
52
        return 0;
53
#endif
54
    return 1;
55
}
56

  
57
static inline void ff_network_close(void)
58
{
59
#ifdef HAVE_WINSOCK2_H
60
    WSACleanup();
61
#endif
62
}
63

  
47 64
#if !defined(HAVE_INET_ATON)
48 65
/* in os_support.c */
49 66
int inet_aton (const char * str, struct in_addr * add);

Also available in: Unified diff