[xiph-cvs] cvs commit: vorbis-tools/ogg123 ogg123.c
Kenneth C. Arnold
kcarnold at xiph.org
Wed Feb 21 21:53:10 PST 2001
kcarnold 01/02/21 21:53:10
Modified: ogg123 ogg123.c
Log:
Fix from Aaron Plattner <aaron at Aaron.homeip.net> for buffer problems.
I'm assuming this works.
Revision Changes Path
1.29 +6 -3 vorbis-tools/ogg123/ogg123.c
Index: ogg123.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/ogg123.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- ogg123.c 2001/02/22 02:49:12 1.28
+++ ogg123.c 2001/02/22 05:53:09 1.29
@@ -14,7 +14,7 @@
* *
********************************************************************
- last mod: $Id: ogg123.c,v 1.28 2001/02/22 02:49:12 kcarnold Exp $
+ last mod: $Id: ogg123.c,v 1.29 2001/02/22 05:53:09 kcarnold Exp $
********************************************************************/
@@ -34,6 +34,7 @@
char convbuffer[4096]; /* take 8k out of the data segment, not the stack */
int convsize = 4096;
+buf_t * buffer = NULL;
struct {
char *key; /* includes the '=' for programming convenience */
@@ -218,6 +219,9 @@
opt.outdevices = current;
}
+ if (buffer != NULL)
+ buffer_shutdown(buffer);
+
ao_shutdown();
return (0);
@@ -236,7 +240,6 @@
long t_min = 0, c_min = 0, r_min = 0;
double t_sec = 0, c_sec = 0, r_sec = 0;
int is_big_endian = ao_is_big_endian();
- buf_t *buffer = NULL;
double realseekpos = opt.seekpos;
/* Junk left over from the failed info struct */
@@ -467,7 +470,7 @@
if(prevrate !=0 && prevchan!=0)
{
- if (buffer != NULL) {
+ if (buffer != NULL && *buffer != NULL) {
buffer_shutdown (*buffer);
*buffer = NULL;
}
--- >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