mirror of https://github.com/mpv-player/mpv
Try reducing the #ifdef mess for the different cache variants.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31202 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
939df8d5a8
commit
991b9b9e6d
|
@ -439,32 +439,30 @@ err_out:
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__MINGW32__) || defined(PTHREAD_CACHE) || defined(__OS2__)
|
#if !defined(__MINGW32__) && !defined(PTHREAD_CACHE) && !defined(__OS2__)
|
||||||
}
|
|
||||||
#ifdef PTHREAD_CACHE
|
|
||||||
static void *ThreadProc( void *s ){
|
|
||||||
#else
|
|
||||||
static void ThreadProc( void *s ){
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_GUI
|
#ifdef CONFIG_GUI
|
||||||
use_gui = 0; // mp_msg may not use gui stuff in forked code
|
use_gui = 0; // mp_msg may not use gui stuff in forked code
|
||||||
#endif
|
#endif
|
||||||
// cache thread mainloop:
|
|
||||||
signal(SIGTERM,exit_sighandler); // kill
|
signal(SIGTERM,exit_sighandler); // kill
|
||||||
signal(SIGUSR1, dummy_sighandler); // wakeup
|
signal(SIGUSR1, dummy_sighandler); // wakeup
|
||||||
cache_mainloop(s);
|
cache_mainloop(s);
|
||||||
#if defined(__MINGW32__) || defined(__OS2__)
|
|
||||||
_endthread();
|
|
||||||
#elif defined(PTHREAD_CACHE)
|
|
||||||
return NULL;
|
|
||||||
#else
|
|
||||||
// make sure forked code never leaves this function
|
// make sure forked code never leaves this function
|
||||||
exit(0);
|
exit(0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PTHREAD_CACHE
|
||||||
|
static void *ThreadProc( void *s ){
|
||||||
|
cache_mainloop(s);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
#elif defined(__MINGW32__) || defined(__OS2__)
|
||||||
|
static void ThreadProc( void *s ){
|
||||||
|
cache_mainloop(s);
|
||||||
|
_endthread();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int cache_stream_fill_buffer(stream_t *s){
|
int cache_stream_fill_buffer(stream_t *s){
|
||||||
int len;
|
int len;
|
||||||
if(s->eof){ s->buf_pos=s->buf_len=0; return 0; }
|
if(s->eof){ s->buf_pos=s->buf_len=0; return 0; }
|
||||||
|
|
Loading…
Reference in New Issue