Merge remote-tracking branch 'qatar/master'
[ffmpeg.git] / libavformat / network.c
index e27c64d..9beaaaf 100644 (file)
@@ -124,13 +124,16 @@ int ff_network_inited_globally;
 
 int ff_network_init(void)
 {
 
 int ff_network_init(void)
 {
+#if HAVE_WINSOCK2_H
+    WSADATA wsaData;
+#endif
+
     if (!ff_network_inited_globally)
         av_log(NULL, AV_LOG_WARNING, "Using network protocols without global "
                                      "network initialization. Please use "
                                      "avformat_network_init(), this will "
                                      "become mandatory later.\n");
 #if HAVE_WINSOCK2_H
     if (!ff_network_inited_globally)
         av_log(NULL, AV_LOG_WARNING, "Using network protocols without global "
                                      "network initialization. Please use "
                                      "avformat_network_init(), this will "
                                      "become mandatory later.\n");
 #if HAVE_WINSOCK2_H
-    WSADATA wsaData;
     if (WSAStartup(MAKEWORD(1,1), &wsaData))
         return 0;
 #endif
     if (WSAStartup(MAKEWORD(1,1), &wsaData))
         return 0;
 #endif