[Speex-dev] More frames in one packet

Jean-Marc Valin jmvalin at jmvalin.ca
Wed Jul 27 17:22:06 PDT 2011


speex_bits_write() does automatically include a terminator. Just be
aware that if there's less than 5 remaining bits in the current byte, it
does not need to do so since there could not possibly be another frame.

Cheers,

	Jean-Marc

On 11-07-26 05:39 PM, Peter Soxberger wrote:
> After searching the mailing list archive (I forgot to do that before posting, sorry!) I found the solutions:
> 
> 1) The documentation has a mistake: The bit terminator is NOT set automatically! (I'm using the latest speex version!) It has to be set manually using speex_bits_insert_terminator(&bits);
> 
> 2) speex_decoder_int() has to be called as long, as it returns -1. After that, all frames should be decoded. This should be added to the docu!
> 
> Bugreport: I tried using speex_bits_remaining() instead of checking the return value of speex_decoder_int() but this leads to an endless loop! Or can't this function be used in this case?


More information about the Speex-dev mailing list