summaryrefslogtreecommitdiff
path: root/libavformat/network.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2011-11-07 13:57:33 +0200
committerMartin Storsjö <martin@martin.st>2011-11-07 19:29:33 +0200
commitce145690b6a53dd9d5134c6d4a5c6d401bc69514 (patch)
treeb83a3b862d43ba9dfb4d27069a9bb7995cd6c051 /libavformat/network.c
parent87892ef8a6b3052dcdaa6b50e1e1835b7d666b42 (diff)
avformat: Warn about using network functions without calling avformat_network_init
This is to make developers aware of the fact that they will start using the new init function at some point. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/network.c')
-rw-r--r--libavformat/network.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/network.c b/libavformat/network.c
index d84dcaf219..f8403aef83 100644
--- a/libavformat/network.c
+++ b/libavformat/network.c
@@ -119,8 +119,15 @@ void ff_tls_deinit(void)
avpriv_unlock_avformat();
}
+int ff_network_inited_globally;
+
int ff_network_init(void)
{
+ 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))