mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 20:03:10 +02:00
Fix cache process accidentally being killed by SIGUSR1.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31250 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
95e8630981
commit
4448190ef0
@ -351,6 +351,9 @@ static void dummy_sighandler(int x) {
|
||||
*/
|
||||
static void cache_mainloop(cache_vars_t *s) {
|
||||
int sleep_count = 0;
|
||||
#if FORKED_CACHE
|
||||
signal(SIGUSR1, SIG_IGN);
|
||||
#endif
|
||||
do {
|
||||
if (!cache_fill(s)) {
|
||||
#if FORKED_CACHE
|
||||
@ -401,6 +404,10 @@ int stream_enable_cache(stream_t *stream,int size,int min,int seek_limit){
|
||||
if (min > s->buffer_size - s->fill_limit) {
|
||||
min = s->buffer_size - s->fill_limit;
|
||||
}
|
||||
// to make sure we wait for the cache process/thread to be active
|
||||
// before continuing
|
||||
if (min <= 0)
|
||||
min = 1;
|
||||
|
||||
#if FORKED_CACHE
|
||||
if((stream->cache_pid=fork())){
|
||||
|
Loading…
Reference in New Issue
Block a user