[xiph-cvs] cvs commit: ogg/src bitwise.c framing.c

Monty xiphmont at xiph.org
Mon Nov 13 15:55:00 PST 2000



xiphmont    00/11/13 15:54:59

  Modified:    include/ogg os_types.h
               src      bitwise.c framing.c
  Log:
  Also need defines for _ogg_free

Revision  Changes    Path
1.3       +4 -3      ogg/include/ogg/os_types.h

Index: os_types.h
===================================================================
RCS file: /usr/local/cvsroot/ogg/include/ogg/os_types.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- os_types.h	2000/11/05 23:50:21	1.2
+++ os_types.h	2000/11/13 23:54:58	1.3
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: #ifdef jail to whip a few platforms into the UNIX ideal.
- last mod: $Id: os_types.h,v 1.2 2000/11/05 23:50:21 xiphmont Exp $
+ last mod: $Id: os_types.h,v 1.3 2000/11/13 23:54:58 xiphmont Exp $
 
  ********************************************************************/
 #ifndef _OS_TYPES_H
@@ -20,9 +20,10 @@
 
 /* make it easy on the folks that want to compile the libs with a
    different malloc than stdlib */
-#define _ogg_malloc malloc
-#define _ogg_calloc calloc
+#define _ogg_malloc  malloc
+#define _ogg_calloc  calloc
 #define _ogg_realloc realloc
+#define _ogg_free    free
 
 #ifdef _WIN32 
 #  ifndef __GNUC__

1.4       +2 -2      ogg/src/bitwise.c

Index: bitwise.c
===================================================================
RCS file: /usr/local/cvsroot/ogg/src/bitwise.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- bitwise.c	2000/11/05 23:50:21	1.3
+++ bitwise.c	2000/11/13 23:54:59	1.4
@@ -12,7 +12,7 @@
  ********************************************************************
 
   function: packing variable sized words into an octet stream
-  last mod: $Id: bitwise.c,v 1.3 2000/11/05 23:50:21 xiphmont Exp $
+  last mod: $Id: bitwise.c,v 1.4 2000/11/13 23:54:59 xiphmont Exp $
 
  ********************************************************************/
 
@@ -48,7 +48,7 @@
 }
 
 void oggpack_writeclear(oggpack_buffer *b){
-  free(b->buffer);
+  _ogg_free(b->buffer);
   memset(b,0,sizeof(oggpack_buffer));
 }
 

1.8       +9 -9      ogg/src/framing.c

Index: framing.c
===================================================================
RCS file: /usr/local/cvsroot/ogg/src/framing.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- framing.c	2000/11/05 23:50:21	1.7
+++ framing.c	2000/11/13 23:54:59	1.8
@@ -13,7 +13,7 @@
 
  function: code raw [Vorbis] packets into framed OggSquish stream and
            decode Ogg streams back into raw packets
- last mod: $Id: framing.c,v 1.7 2000/11/05 23:50:21 xiphmont Exp $
+ last mod: $Id: framing.c,v 1.8 2000/11/13 23:54:59 xiphmont Exp $
 
  note: The CRC code is directly derived from public domain code by
  Ross Williams (ross at guest.adelaide.edu.au).  See docs/framing.html
@@ -156,9 +156,9 @@
 /* _clear does not free os, only the non-flat storage within */
 int ogg_stream_clear(ogg_stream_state *os){
   if(os){
-    if(os->body_data)free(os->body_data);
-    if(os->lacing_vals)free(os->lacing_vals);
-    if(os->granule_vals)free(os->granule_vals);
+    if(os->body_data)_ogg_free(os->body_data);
+    if(os->lacing_vals)_ogg_free(os->lacing_vals);
+    if(os->granule_vals)_ogg_free(os->granule_vals);
 
     memset(os,0,sizeof(ogg_stream_state));    
   }
@@ -168,7 +168,7 @@
 int ogg_stream_destroy(ogg_stream_state *os){
   if(os){
     ogg_stream_clear(os);
-    free(os);
+    _ogg_free(os);
   }
   return(0);
 } 
@@ -432,7 +432,7 @@
 /* clear non-flat storage within */
 int ogg_sync_clear(ogg_sync_state *oy){
   if(oy){
-    if(oy->data)free(oy->data);
+    if(oy->data)_ogg_free(oy->data);
     ogg_sync_init(oy);
   }
   return(0);
@@ -441,7 +441,7 @@
 int ogg_sync_destroy(ogg_sync_state *oy){
   if(oy){
     ogg_sync_clear(oy);
-    free(oy);
+    _ogg_free(oy);
   }
   return(0);
 }
@@ -1226,7 +1226,7 @@
       }
     }
   }
-  free(data);
+  _ogg_free(data);
   if(headers[pageno]!=NULL){
     fprintf(stderr,"did not write last page!\n");
     exit(1);
@@ -1391,7 +1391,7 @@
       ogg_stream_packetin(&os_en,&op);
     }
 
-    free(data);
+    _ogg_free(data);
 
     /* retrieve finished pages */
     for(i=0;i<5;i++){

--- >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