diff options
author | filon <filon@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-01-10 18:28:18 +0000 |
---|---|---|
committer | filon <filon@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-01-10 18:28:18 +0000 |
commit | c7c41db7cac893d5c50a1ca01e5e1eca42f6faba (patch) | |
tree | 91b82b3547d27206d91e15ece3eae2f73216294c | |
parent | 5ebe3d8c89145d846640b984379e5f9fffd7005d (diff) | |
download | mpv-c7c41db7cac893d5c50a1ca01e5e1eca42f6faba.tar.bz2 mpv-c7c41db7cac893d5c50a1ca01e5e1eca42f6faba.tar.xz |
Workaround for returning very litte buffer space.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8875 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libao2/ao_alsa1x.c | 6 | ||||
-rw-r--r-- | libao2/ao_alsa9.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/libao2/ao_alsa1x.c b/libao2/ao_alsa1x.c index 67f3ee3bd8..b171c93dd8 100644 --- a/libao2/ao_alsa1x.c +++ b/libao2/ao_alsa1x.c @@ -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); } diff --git a/libao2/ao_alsa9.c b/libao2/ao_alsa9.c index 67f3ee3bd8..b171c93dd8 100644 --- a/libao2/ao_alsa9.c +++ b/libao2/ao_alsa9.c @@ -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); } |