diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-11-09 15:34:55 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-11-09 15:34:55 +0000 |
commit | 263e4a1144d903f6421ab2f86fc4e031657241a1 (patch) | |
tree | 0e565ce56840e54164ef8853a6a3c23c546dbacd /libmpcodecs | |
parent | 4b55351e28d06e02f19e1f5bff62abf71cb8455b (diff) | |
download | mpv-263e4a1144d903f6421ab2f86fc4e031657241a1.tar.bz2 mpv-263e4a1144d903f6421ab2f86fc4e031657241a1.tar.xz |
Allow teletext compilation without pthreads
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29865 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/dec_teletext.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libmpcodecs/dec_teletext.c b/libmpcodecs/dec_teletext.c index 446f2ed0f6..e676990a02 100644 --- a/libmpcodecs/dec_teletext.c +++ b/libmpcodecs/dec_teletext.c @@ -88,7 +88,16 @@ #include <math.h> #include <stdio.h> +#ifdef HAVE_PTHREADS +// pthreads are needed for async updates from v4l(2) +// FIXME: try to avoid using pthread calls when running only a single +// thread as e.g. with DVB teletext #include <pthread.h> +#else +#define pthread_mutex_init(m, p) +#define pthread_mutex_lock(m) +#define pthread_mutex_unlock(m) +#endif #include "dec_teletext.h" #include "mp_msg.h" @@ -138,7 +147,9 @@ typedef struct { int pll_fixed; /// vbi stream properties (buffer size,bytes per line, etc) tt_stream_props* ptsp; +#ifdef HAVE_PTHREADS pthread_mutex_t buffer_mutex; +#endif tt_page** ptt_cache; unsigned char* ptt_cache_first_subpage; |