Micky Latowicki
2006-Jan-29 05:15 UTC
[Speex-dev] is it ok to call speex_encode_int after speex_bits_write?
I'm reliably getting a corrupt stream when I do a certain encoding and decoding test. I've pegged it down to this: encoding some frames, calling speex_bits_write() and then encoding another frame produces a corrupt stream. My question is, is this a speex bug or incorrect API use? I can provide a test case (currently in python, will translate to c if needed). Thanks, Micky
Jean-Marc Valin
2006-Jan-30 14:34 UTC
[Speex-dev] is it ok to call speex_encode_int after speex_bits_write?
Hi, You should call speex_bits_reset() after calling speex_bits_write() otherwise you keep appending data. Oh, and have a look at the examples. Jean-Marc Le dimanche 29 janvier 2006 ? 15:16 +0200, Micky Latowicki a ?crit :> I'm reliably getting a corrupt stream when I do a certain encoding and > decoding test. > > I've pegged it down to this: encoding some frames, calling > speex_bits_write() and then encoding another frame produces a corrupt > stream. > > My question is, is this a speex bug or incorrect API use? > > I can provide a test case (currently in python, will translate to c if > needed). > > Thanks, > > Micky > _______________________________________________ > Speex-dev mailing list > Speex-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev >