]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
kill global variable af from all audio format handlers
authorAndre Noll <maan@systemlinux.org>
Sun, 11 Mar 2007 17:23:24 +0000 (18:23 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 11 Mar 2007 17:23:24 +0000 (18:23 +0100)
Also rename the argument of the init function from "p" to "afh".

aac_afh.c
mp3_afh.c
ogg_afh.c

index ab97cdad0da50177b0820651dfd69f7237a7cd27..1ab865971fa663f4e669bbd375ea732b00c6e259 100644 (file)
--- a/aac_afh.c
+++ b/aac_afh.c
@@ -191,9 +191,9 @@ out:
 
 static const char* aac_suffixes[] = {"m4a", "mp4", NULL};
 /** the init function of the aac audio format handler */
 
 static const char* aac_suffixes[] = {"m4a", "mp4", NULL};
 /** the init function of the aac audio format handler */
-void aac_afh_init(struct audio_format_handler *p)
+void aac_afh_init(struct audio_format_handler *afh)
 {
 {
-       p->get_file_info = aac_get_file_info,
-       p->close_audio_file = aac_close_audio_file;
-       p->suffixes = aac_suffixes;
+       afh->get_file_info = aac_get_file_info,
+       afh->close_audio_file = aac_close_audio_file;
+       afh->suffixes = aac_suffixes;
 }
 }
index 898547fce4870ebb94beb10ee950dee4b05ea11e..51b95c9952dd9735fbff785a341959409d8e307a 100644 (file)
--- a/mp3_afh.c
+++ b/mp3_afh.c
@@ -104,7 +104,6 @@ static const char *mode_text[] = {"stereo", "joint stereo", "dual channel", "mon
 
 static FILE *infile;
 static struct mp3info mp3;
 
 static FILE *infile;
 static struct mp3info mp3;
-static struct audio_format_handler *af;
 static ssize_t num_chunks;
 
 static int header_frequency(struct mp3header *h)
 static ssize_t num_chunks;
 
 static int header_frequency(struct mp3header *h)
@@ -476,10 +475,9 @@ static const char* mp3_suffixes[] = {"mp3", NULL};
  *
  * \param p pointer to the struct to initialize
  */
  *
  * \param p pointer to the struct to initialize
  */
-void mp3_init(struct audio_format_handler *p)
+void mp3_init(struct audio_format_handler *afh)
 {
 {
-       af = p;
-       af->get_file_info = mp3_get_file_info;
-       af->close_audio_file = mp3_close_audio_file;
-       af->suffixes = mp3_suffixes;
+       afh->get_file_info = mp3_get_file_info;
+       afh->close_audio_file = mp3_close_audio_file;
+       afh->suffixes = mp3_suffixes;
 }
 }
index f972c630ee837953fe6d56c11b332c1124e131d3..1034091358b51b300737fcd3ae5404ac0a5363fe 100644 (file)
--- a/ogg_afh.c
+++ b/ogg_afh.c
@@ -33,7 +33,6 @@
 static double chunk_time = 0.25;
 
 FILE *audio_file;
 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)
 {
 
 static size_t cb_read(void *buf, size_t size, size_t nmemb, void *datasource)
 {
@@ -286,10 +285,9 @@ static const char* ogg_suffixes[] = {"ogg", NULL};
  *
  * \param p pointer to the struct to initialize
  */
  *
  * \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->close_audio_file = ogg_close_audio_file;
+       afh->suffixes = ogg_suffixes;
 }
 }