diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-06-04 16:55:22 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-06-04 16:55:22 +0200 |
commit | 124a9edb5f172ce36b11fd0d6ccc9f15cc51f322 (patch) | |
tree | faee26bfc6834dfe55236f90354c28bf2eb14cc7 /libavformat/udp.c | |
parent | 87f40364d1a22aff5c9c245fa4ad07275c954248 (diff) | |
download | ffmpeg-124a9edb5f172ce36b11fd0d6ccc9f15cc51f322.tar.gz |
udp: support old, crappy non pthread mode
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/udp.c')
-rw-r--r-- | libavformat/udp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/udp.c b/libavformat/udp.c index 7a01d29758..7c18fb7bf0 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -35,7 +35,11 @@ #include "network.h" #include "os_support.h" #include "url.h" + +#if HAVE_PTHREADS #include <pthread.h> +#endif + #include <sys/time.h> #ifndef IPV6_ADD_MEMBERSHIP @@ -58,7 +62,9 @@ typedef struct { int circular_buffer_size; AVFifoBuffer *fifo; int circular_buffer_error; +#if HAVE_PTHREADS pthread_t circular_buffer_thread; +#endif } UDPContext; #define UDP_TX_BUF_SIZE 32768 @@ -505,6 +511,7 @@ static int udp_open(URLContext *h, const char *uri, int flags) s->udp_fd = udp_fd; +#if HAVE_PTHREADS if (!is_output && s->circular_buffer_size) { /* start the task going */ s->fifo = av_fifo_alloc(s->circular_buffer_size); @@ -513,6 +520,7 @@ static int udp_open(URLContext *h, const char *uri, int flags) goto fail; } } +#endif return 0; fail: |