[xiph-cvs] cvs commit: ao/src/plugins/arts ao_arts.c

Michael Smith msmith at xiph.org
Tue Feb 27 23:50:13 PST 2001



msmith      01/02/27 23:50:12

  Modified:    src      ao_null.c ao_wav.c audio_out.c
               src/plugins/arts ao_arts.c
  Log:
  Fix the really obvious errors found in various places trying to track down
  the arts bug.
   - wrong function prototypes in ao_null and ao_wav
   - freeing stuff based on wrong tests in audio_out.c
   - fix a memory leak in ao_arts.c

Revision  Changes    Path
1.4       +1 -1      ao/src/ao_null.c

Index: ao_null.c
===================================================================
RCS file: /usr/local/cvsroot/ao/src/ao_null.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ao_null.c	2001/02/24 01:31:46	1.3
+++ ao_null.c	2001/02/28 07:50:11	1.4
@@ -73,7 +73,7 @@
         return &ao_null_info;
 }
 
-static int ao_null_get_latency(void)
+static int ao_null_get_latency(ao_internal_t *state)
 {
         return 0;
 }

1.7       +1 -1      ao/src/ao_wav.c

Index: ao_wav.c
===================================================================
RCS file: /usr/local/cvsroot/ao/src/ao_wav.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ao_wav.c	2001/02/24 01:31:46	1.6
+++ ao_wav.c	2001/02/28 07:50:11	1.7
@@ -300,7 +300,7 @@
         free(s);
 }
 
-static int ao_wav_get_latency(void)
+static int ao_wav_get_latency(ao_internal_t *state)
 {
         return 0;
 }

1.13      +5 -2      ao/src/audio_out.c

Index: audio_out.c
===================================================================
RCS file: /usr/local/cvsroot/ao/src/audio_out.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- audio_out.c	2001/02/24 01:31:46	1.12
+++ audio_out.c	2001/02/28 07:50:11	1.13
@@ -161,8 +161,11 @@
         }
 
         /* free the standard drivers */
-	if (driver_head->next) free(driver_head->next);
-	if (driver_head->next) free(driver_head);
+	if (driver_head) {
+		if(driver_head->next)
+			free(driver_head->next);
+		free(driver_head);
+	}
         
         /* NULL out driver_head or ao_initialize won't work */
         driver_head = NULL;

1.3       +1 -0      ao/src/plugins/arts/ao_arts.c

Index: ao_arts.c
===================================================================
RCS file: /usr/local/cvsroot/ao/src/plugins/arts/ao_arts.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ao_arts.c	2001/02/24 01:31:47	1.2
+++ ao_arts.c	2001/02/28 07:50:12	1.3
@@ -89,6 +89,7 @@
 {
   arts_close_stream(((ao_arts_internal_t *)state)->stream);
   arts_free();
+  free(state);
 }
 
   void

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list