1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

network: properly declare WSADATA in windows

Fixed "ISO C90 forbids mixed declarations and code" in ff_network_init

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
Sergey Radionov 2011-12-21 09:19:10 +07:00 committed by Luca Barbato
parent 9f3c77dd2a
commit 139cef8e29

View File

@ -123,13 +123,16 @@ 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
WSADATA wsaData;
if (WSAStartup(MAKEWORD(1,1), &wsaData))
return 0;
#endif