Mercurial > mplayer.hg
changeset 29823:baf634c992be
Allow teletext compilation without pthreads
author | reimar |
---|---|
date | Mon, 09 Nov 2009 15:34:55 +0000 |
parents | 60563cd70955 |
children | 00068773e235 |
files | libmpcodecs/dec_teletext.c |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/dec_teletext.c Mon Nov 09 15:17:06 2009 +0000 +++ b/libmpcodecs/dec_teletext.c Mon Nov 09 15:34:55 2009 +0000 @@ -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 @@ 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;