diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-28 13:19:11 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-28 13:19:11 +0100 |
commit | 8943ad40146d322f5a5bf2bab790d117ec7a4c37 (patch) | |
tree | 3aa57b91ebe60e9958219e944db3d675e6972ba7 /libavformat/network.c | |
parent | f9f79cb0ecb68546e6de3db6072f631bb3fbcff8 (diff) | |
parent | 4521645b1aee9e9ad8f5cea7b2392cd5f6ffcd26 (diff) | |
download | ffmpeg-8943ad40146d322f5a5bf2bab790d117ec7a4c37.tar.gz |
Merge commit '4521645b1aee9e9ad8f5cea7b2392cd5f6ffcd26'
* commit '4521645b1aee9e9ad8f5cea7b2392cd5f6ffcd26':
avio: fix pointer type mismatches in avio_enum_protocols()
avserver: use socklen_t where appropriate
udp: use socklen_t where appropriate
network: use HAVE_THREADS instead of local hack
af_channelmap: remove stray enum declaration
buffersink: remove stray semicolon after function definition
Conflicts:
libavformat/avio.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/network.c')
-rw-r--r-- | libavformat/network.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/libavformat/network.c b/libavformat/network.c index 3e142fceab..6e924bed66 100644 --- a/libavformat/network.c +++ b/libavformat/network.c @@ -25,9 +25,7 @@ #include "url.h" #include "libavutil/time.h" -#define THREADS (HAVE_PTHREADS || (defined(WIN32) && !defined(__MINGW32CE__))) - -#if THREADS +#if HAVE_THREADS #if HAVE_PTHREADS #include <pthread.h> #else @@ -38,7 +36,7 @@ #if CONFIG_OPENSSL #include <openssl/ssl.h> static int openssl_init; -#if THREADS +#if HAVE_THREADS #include <openssl/crypto.h> #include "libavutil/avutil.h" pthread_mutex_t *openssl_mutexes; @@ -59,7 +57,7 @@ static unsigned long openssl_thread_id(void) #endif #if CONFIG_GNUTLS #include <gnutls/gnutls.h> -#if THREADS && GNUTLS_VERSION_NUMBER <= 0x020b00 +#if HAVE_THREADS && GNUTLS_VERSION_NUMBER <= 0x020b00 #include <gcrypt.h> #include <errno.h> #undef malloc @@ -75,7 +73,7 @@ void ff_tls_init(void) if (!openssl_init) { SSL_library_init(); SSL_load_error_strings(); -#if THREADS +#if HAVE_THREADS if (!CRYPTO_get_locking_callback()) { int i; openssl_mutexes = av_malloc(sizeof(pthread_mutex_t) * CRYPTO_num_locks()); @@ -91,7 +89,7 @@ void ff_tls_init(void) openssl_init++; #endif #if CONFIG_GNUTLS -#if THREADS && GNUTLS_VERSION_NUMBER < 0x020b00 +#if HAVE_THREADS && GNUTLS_VERSION_NUMBER < 0x020b00 if (gcry_control(GCRYCTL_ANY_INITIALIZATION_P) == 0) gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); #endif @@ -106,7 +104,7 @@ void ff_tls_deinit(void) #if CONFIG_OPENSSL openssl_init--; if (!openssl_init) { -#if THREADS +#if HAVE_THREADS if (CRYPTO_get_locking_callback() == openssl_lock) { int i; CRYPTO_set_locking_callback(NULL); |