1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-22 06:42:03 +00:00

Workaround for returning very litte buffer space.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8875 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
filon 2003-01-10 18:28:18 +00:00
parent 5ebe3d8c89
commit c7c41db7ca
2 changed files with 12 additions and 0 deletions

View File

@ -59,6 +59,8 @@ static int alsa_fragsize = 4096;
static int alsa_fragcount = 16;
static int chunk_size = 1024; //is alsa_fragsize / 4
#define MIN_CHUNK_SIZE 1024
static size_t bits_per_sample, bytes_per_sample, bits_per_frame;
static size_t chunk_bytes;
@ -1084,6 +1086,10 @@ static int get_space()
ret = 0;
}
// workaround for too small value returned
if (ret < MIN_CHUNK_SIZE)
ret = 0;
return(ret);
}

View File

@ -59,6 +59,8 @@ static int alsa_fragsize = 4096;
static int alsa_fragcount = 16;
static int chunk_size = 1024; //is alsa_fragsize / 4
#define MIN_CHUNK_SIZE 1024
static size_t bits_per_sample, bytes_per_sample, bits_per_frame;
static size_t chunk_bytes;
@ -1084,6 +1086,10 @@ static int get_space()
ret = 0;
}
// workaround for too small value returned
if (ret < MIN_CHUNK_SIZE)
ret = 0;
return(ret);
}