aboutsummaryrefslogtreecommitdiffstats
path: root/src/playerData.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-04-01 00:33:35 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-04-01 00:33:35 +0000
commite9efaeaca9993e32c32e24de925f6a25378a694d (patch)
treec66df539dcc15e6844f1eac15d25fe3bf7ef8187 /src/playerData.c
parent795a1e930b6d3d606546689e991149b9ad583066 (diff)
downloadmpd-e9efaeaca9993e32c32e24de925f6a25378a694d.tar.gz
mpd-e9efaeaca9993e32c32e24de925f6a25378a694d.tar.xz
mpd-e9efaeaca9993e32c32e24de925f6a25378a694d.zip
use 16-bit signed ints for storing positions in the ring buffer
git-svn-id: https://svn.musicpd.org/mpd/trunk@576 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/playerData.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/playerData.c b/src/playerData.c
index 3f22483d1..07b0dfb3c 100644
--- a/src/playerData.c
+++ b/src/playerData.c
@@ -51,6 +51,11 @@ void initPlayerData() {
buffered_chunks = bufferSize/CHUNK_SIZE;
+ if(buffered_chunks >= 1<<15) {
+ ERROR("buffer size \"%i\" is too big\n",bufferSize);
+ exit(-1);
+ }
+
perc = strtod((getConf())[CONF_BUFFER_BEFORE_PLAY],&test);
if(*test!='%' || perc<0 || perc>100) {
ERROR("buffered before play \"%s\" is not a positive "