aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/playerData.c5
-rw-r--r--src/playerData.h8
2 files changed, 9 insertions, 4 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 "
diff --git a/src/playerData.h b/src/playerData.h
index 7da51e7b3..52cbba1be 100644
--- a/src/playerData.h
+++ b/src/playerData.h
@@ -37,10 +37,10 @@ typedef struct _Buffer {
mpd_uint16 * chunkSize;
mpd_uint16 * bitRate;
float * times;
- int begin;
- int end;
- int next;
- int wrap;
+ mpd_sint16 begin;
+ mpd_sint16 end;
+ mpd_sint16 next;
+ mpd_sint8 wrap;
float totalTime;
} Buffer;