make get_file_info() return the chunk table
[paraslash.git] / vss.c
diff --git a/vss.c b/vss.c
index b34703de5bd8b8fb46a99a87587c77f86e0ca617..ea647254e497ac9ffa7eb3963a6a11759719d67b 100644 (file)
--- a/vss.c
+++ b/vss.c
@@ -42,6 +42,7 @@ static struct timeval autoplay_barrier;
 extern struct misc_meta_data *mmd;
 extern struct audio_file_selector selectors[];
 extern struct sender senders[];
+static size_t *chunk_table;
 
 static FILE *audio_file = NULL;
 
@@ -86,6 +87,8 @@ static struct audio_format_handler afl[] = {
 /** iterate over each supported audio format */
 #define FOR_EACH_AUDIO_FORMAT(i) for (i = 0; afl[i].name; i++)
 
+
+
 /**
  * check if vss status flag \a P (playing) is set
  *
@@ -182,7 +185,7 @@ void vss_init(void)
 static int get_file_info(int i)
 {
        return  afl[i].get_file_info(audio_file, mmd->audio_file_info,
-               &mmd->chunks_total, &mmd->seconds_total);
+               &mmd->chunks_total, &mmd->seconds_total, &chunk_table);
 }
 
 /**
@@ -220,7 +223,7 @@ static int get_audio_format(int omit)
        int i;
 
        FOR_EACH_AUDIO_FORMAT(i) {
-               if (i == omit || !afl[i].get_file_info)
+               if (i == omit)
                        continue;
                rewind(audio_file);
                if (get_file_info(i) > 0)
@@ -482,8 +485,6 @@ again:
                }
                mmd->chunks_sent = 0;
        }
-       if (af && vss_repos() && mmd->current_chunk != mmd->repos_request)
-               af->reposition_stream(mmd->repos_request);
        if (vss_repos()) {
                mmd->new_vss_status_flags &= ~(VSS_REPOS);
                mmd->current_chunk = mmd->repos_request;