I don't see a call to init SpeexBits bits; speex_bits_init(&bits); Maybe bits->buf_size is not inited? -win __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com