thp: set audio packet durations
[ffmpeg.git] / libavformat / network.c
index d84dcaf..432084f 100644 (file)
@@ -119,10 +119,20 @@ void ff_tls_deinit(void)
     avpriv_unlock_avformat();
 }
 
+int ff_network_inited_globally;
+
 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 (WSAStartup(MAKEWORD(1,1), &wsaData))
         return 0;
 #endif
@@ -172,4 +182,3 @@ int ff_is_multicast_address(struct sockaddr *addr)
 
     return 0;
 }
-