[Speex-dev] Bug (and fix) for speex_jitter_buffer.c

Joshua Gargus schwa at fastmail.us
Fri Sep 12 22:11:42 PDT 2008


Hi,

I'd like to report a bug in speexclient/speex_jitter_buffer.c.  In the
function speex_jitter_get(), after the line:

    packet.data = data;

add the line

    packet.len = 2048;


If this variable is uninitialized, then in jitter_buffer_get() (in
jitter.c), the predicate "jitter->packets[i].len > packet->len" is
undetermined.  When this happens, the wrong amount of data is copied
from the jitter-buffer (eg: if (packet->len == 0), then no data is
copied).  For some reason, this didn't bite me on OS X, but when porting
to Windows, it consistently caused errors.

Now that I have it working, the jitter-buffer sounds great!  Thanks
again for Speex.

Cheers,
Josh


More information about the Speex-dev mailing list