We never called vorbis_comment_clear() in either of these examples. That's bad.
authorMike Smith <msmith@xiph.org>
Sat, 20 Jan 2001 14:06:28 +0000 (14:06 +0000)
committerMike Smith <msmith@xiph.org>
Sat, 20 Jan 2001 14:06:28 +0000 (14:06 +0000)
Do so.

svn path=/trunk/vorbis/; revision=1188

examples/decoder_example.c
examples/encoder_example.c

index da9d57f..94267a8 100644 (file)
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: simple example decoder
- last mod: $Id: decoder_example.c,v 1.15 2000/12/21 21:04:37 xiphmont Exp $
+ last mod: $Id: decoder_example.c,v 1.16 2001/01/20 14:06:28 msmith Exp $
 
  ********************************************************************/
 
@@ -291,6 +291,7 @@ int main(int argc, char **argv){
     
     vorbis_block_clear(&vb);
     vorbis_dsp_clear(&vd);
+       vorbis_comment_clear(&vc);
     vorbis_info_clear(&vi);  /* must be called last */
   }
 
index 1d6444f..fb7edb5 100644 (file)
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: simple example encoder
- last mod: $Id: encoder_example.c,v 1.17 2000/12/21 21:04:37 xiphmont Exp $
+ last mod: $Id: encoder_example.c,v 1.18 2001/01/20 14:06:28 msmith Exp $
 
  ********************************************************************/
 
@@ -188,6 +188,7 @@ int main(){
   ogg_stream_clear(&os);
   vorbis_block_clear(&vb);
   vorbis_dsp_clear(&vd);
+  vorbis_comment_clear(&vc);
   vorbis_info_clear(&vi);
   
   /* ogg_page and ogg_packet structs always point to storage in