Alfred E. Heggestad
2006-Jun-10 11:09 UTC
[Speex-dev] [PATCH] bug in sample code sampledec.c
Hi
there is a small bug in the sample code 'sampledec.c' here:
http://www.speex.org/manual2/node12.html#SECTION000121000000000000000
it is trying to destroy the encoder of the "decoder" state, this
patch should fix it:
Index: doc/sampledec.c
==================================================================---
doc/sampledec.c (revision 11555)
+++ doc/sampledec.c (working copy)
@@ -57,7 +57,7 @@
}
/*Destroy the decoder state*/
- speex_encoder_destroy(state);
+ speex_decoder_destroy(state);
/*Destroy the bit-stream truct*/
speex_bits_destroy(&bits);
fclose(fout);
--
Alfred E. Heggestad <aeh@db.org>
Web: http://aeh.db.org/
VoIP: <sip:alfredh@symbianos.org>
Phone: +47 21 98 71 20
Mobile: +47 98 23 67 05
Skype: alfredheggestad
Thanks. Patch applied to svn trunk. Jean-Marc Le samedi 10 juin 2006 ? 20:09 +0200, Alfred E. Heggestad a ?crit :> Hi > > there is a small bug in the sample code 'sampledec.c' here: > > http://www.speex.org/manual2/node12.html#SECTION000121000000000000000 > > it is trying to destroy the encoder of the "decoder" state, this > patch should fix it: > > > Index: doc/sampledec.c > ==================================================================> --- doc/sampledec.c (revision 11555) > +++ doc/sampledec.c (working copy) > @@ -57,7 +57,7 @@ > } > > /*Destroy the decoder state*/ > - speex_encoder_destroy(state); > + speex_decoder_destroy(state); > /*Destroy the bit-stream truct*/ > speex_bits_destroy(&bits); > fclose(fout); > > >