diff options
author | Monty <xiphmont@xiph.org> | 2000-11-13 23:54:59 +0000 |
---|---|---|
committer | Monty <xiphmont@xiph.org> | 2000-11-13 23:54:59 +0000 |
commit | 424fd494ace30c9b6527d5cc23b869a86cfebd2f (patch) | |
tree | a3e1e9c4dc1e4321aef1f30c8237eca6964b18e1 | |
parent | 8621441b95800dfddd179846259c5c92073a3ebf (diff) | |
download | ogg-424fd494ace30c9b6527d5cc23b869a86cfebd2f.tar.gz |
Also need defines for _ogg_free
git-svn-id: http://svn.xiph.org/trunk/ogg@1053 0101bb08-14d6-0310-b084-bc0e0c8e3800
-rw-r--r-- | include/ogg/os_types.h | 7 | ||||
-rw-r--r-- | src/bitwise.c | 4 | ||||
-rw-r--r-- | src/framing.c | 18 |
3 files changed, 15 insertions, 14 deletions
diff --git a/include/ogg/os_types.h b/include/ogg/os_types.h index 15455dc..ff476be 100644 --- a/include/ogg/os_types.h +++ b/include/ogg/os_types.h @@ -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__ diff --git a/src/bitwise.c b/src/bitwise.c index f63f809..8007b03 100644 --- a/src/bitwise.c +++ b/src/bitwise.c @@ -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_reset(oggpack_buffer *b){ } void oggpack_writeclear(oggpack_buffer *b){ - free(b->buffer); + _ogg_free(b->buffer); memset(b,0,sizeof(oggpack_buffer)); } diff --git a/src/framing.c b/src/framing.c index eef225f..720bc08 100644 --- a/src/framing.c +++ b/src/framing.c @@ -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@guest.adelaide.edu.au). See docs/framing.html @@ -156,9 +156,9 @@ int ogg_stream_init(ogg_stream_state *os,int serialno){ /* _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_clear(ogg_stream_state *os){ 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 @@ int ogg_sync_init(ogg_sync_state *oy){ /* 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_clear(ogg_sync_state *oy){ 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 @@ void test_pack(const int *pl, const int **headers){ } } } - free(data); + _ogg_free(data); if(headers[pageno]!=NULL){ fprintf(stderr,"did not write last page!\n"); exit(1); @@ -1391,7 +1391,7 @@ int main(void){ ogg_stream_packetin(&os_en,&op); } - free(data); + _ogg_free(data); /* retrieve finished pages */ for(i=0;i<5;i++){ |