]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - ogg_afh.c
kill close_audio_file handler from struct audio format.
[paraslash.git] / ogg_afh.c
index f972c630ee837953fe6d56c11b332c1124e131d3..3c7a143121897d045658195713bcb47170c6324f 100644 (file)
--- a/ogg_afh.c
+++ b/ogg_afh.c
@@ -32,9 +32,6 @@
 #define CHUNK_SIZE 32768
 static double chunk_time = 0.25;
 
-FILE *audio_file;
-static struct audio_format_handler *af;
-
 static size_t cb_read(void *buf, size_t size, size_t nmemb, void *datasource)
 {
        FILE *f = datasource;
@@ -215,11 +212,6 @@ static long unsigned ogg_compute_chunk_table(OggVorbis_File *of,
        return num_chunks;
 }
 
-static void ogg_close_audio_file(void)
-{
-       fclose(audio_file);
-}
-
 /*
  * Init oggvorbis file and write some tech data to given pointers.
  */
@@ -267,7 +259,6 @@ static int ogg_get_file_info(FILE *file, struct audio_format_info *afi)
                vi_sampling_rate / 1000, vi->channels, vi_bitrate / 1000
                );
        rewind(file);
-       audio_file = file;
        afi->chunk_tv.tv_sec = 0;
        afi->chunk_tv.tv_usec = 250 * 1000;
        tv_scale(3, &afi->chunk_tv, &afi->eof_tv);
@@ -286,10 +277,8 @@ static const char* ogg_suffixes[] = {"ogg", NULL};
  *
  * \param p pointer to the struct to initialize
  */
-void ogg_init(struct audio_format_handler *p)
+void ogg_init(struct audio_format_handler *afh)
 {
-       af = p;
-       af->get_file_info = ogg_get_file_info,
-       af->close_audio_file = ogg_close_audio_file;
-       af->suffixes = ogg_suffixes;
+       afh->get_file_info = ogg_get_file_info,
+       afh->suffixes = ogg_suffixes;
 }