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;
|
||||
}
|
||||
|
||||
#if defined(__MINGW32__) || defined(PTHREAD_CACHE) || defined(__OS2__)
|
||||
}
|
||||
#ifdef PTHREAD_CACHE
|
||||
static void *ThreadProc( void *s ){
|
||||
#else
|
||||
static void ThreadProc( void *s ){
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(__MINGW32__) && !defined(PTHREAD_CACHE) && !defined(__OS2__)
|
||||
#ifdef CONFIG_GUI
|
||||
use_gui = 0; // mp_msg may not use gui stuff in forked code
|
||||
#endif
|
||||
// cache thread mainloop:
|
||||
signal(SIGTERM,exit_sighandler); // kill
|
||||
signal(SIGUSR1, dummy_sighandler); // wakeup
|
||||
cache_mainloop(s);
|
||||
#if defined(__MINGW32__) || defined(__OS2__)
|
||||
_endthread();
|
||||
#elif defined(PTHREAD_CACHE)
|
||||
return NULL;
|
||||
#else
|
||||
// make sure forked code never leaves this function
|
||||
exit(0);
|
||||
#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 len;
|
||||
if(s->eof){ s->buf_pos=s->buf_len=0; return 0; }
|
||||
|
|
Loading…
Reference in New Issue