[Speex-dev] Deallocation of buffers

Jean-Marc Valin Jean-Marc.Valin at USherbrooke.ca
Wed May 25 11:59:59 PDT 2005


That's true. I changed the way the allocation is made and I forgot to
update the _destroy() functions to reflect that.

	Jean-Marc

Le mercredi 25 mai 2005 à 14:58 -0400, Fritz Koenig a écrit :
> I noticed that in the narrow band and wide band destroy functions only 
> the main pointer is being freed.  I think that it should be:
> 
> void nb_decoder_destroy(void *state)
> {
>     DecState *st;
>     st=(DecState*)state;
> 
>     speex_free (st->inBuf);
>     speex_free (st->excBuf);
>     speex_free (st->innov);
>     speex_free (st->interp_qlpc);
>     speex_free (st->qlsp);
>     speex_free (st->old_qlsp);
>     speex_free (st->interp_qlsp);
>     speex_free (st->mem_sp);
>     speex_free (st->comb_mem);
>     speex_free (st->pi_gain);
> 
>     speex_free (st);
> }
> 
> This would apply to the encoder destroy functions also.
> 
> -Fritz
> 
> On2 Technologies, Inc.
> http://www.on2.com
> 
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev

-- 
Jean-Marc Valin <Jean-Marc.Valin at USherbrooke.ca>
Universite de Sherbrooke



More information about the Speex-dev mailing list