]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - mp3.c
configure.ac: Add check for unix socket credentials
[paraslash.git] / mp3.c
diff --git a/mp3.c b/mp3.c
index c1d5ae3f12277ae32365955e932c87570ed093cb..3f8eb009bbd3f0cf2b713a9abba72902f08a9cca 100644 (file)
--- a/mp3.c
+++ b/mp3.c
@@ -101,7 +101,7 @@ static int mp3info_bitrate[2][3][14] = {
 };
 
 static int frame_size_index[] = {24000, 72000, 72000};
-static char *mode_text[] = {"stereo", "joint stereo", "dual channel", "mono", "invalid"};
+static const char *mode_text[] = {"stereo", "joint stereo", "dual channel", "mono", "invalid"};
 
 static struct mp3info mp3;
 static char mp3buf[8192];
@@ -125,7 +125,7 @@ static int header_frequency(struct mp3header *h)
        return frequencies[h->version][h->freq];
 }
 
-static char *header_mode(struct mp3header *h)
+static const char *header_mode(struct mp3header *h)
 {
        if (h->mode > 4)
                h->mode = 4; /* invalid */
@@ -411,7 +411,8 @@ static int mp3_read_info(void)
        tv_divide(fcount, &total_time, &af->chunk_tv);
        rewind(mp3.file);
        PARA_DEBUG_LOG("chunk_time: %lu\n", af->chunk_tv.tv_usec);
-       tv_scale(10, &af->chunk_tv, &af->eof_tv);
+       tv_scale(30, &af->chunk_tv, &af->eof_tv);
+       PARA_DEBUG_LOG("eof timeout: %lu\n", tv2ms(&af->eof_tv));
        return 1;
 }
 
@@ -473,7 +474,7 @@ static int mp3_read_next_chunk(void)
        return chunk_size;
 }
 
-static char *mp3_read_chunk(__unused long unsigned chunk_num, ssize_t *len)
+static char *mp3_read_chunk(__a_unused long unsigned chunk_num, ssize_t *len)
 {
        *len = mp3_read_next_chunk();
        if (*len <= 0)