[xiph-commits] r14225 - trunk/speex/libspeex
jm at svn.xiph.org
jm at svn.xiph.org
Sat Nov 24 22:00:35 PST 2007
Author: jm
Date: 2007-11-24 22:00:34 -0800 (Sat, 24 Nov 2007)
New Revision: 14225
Modified:
trunk/speex/libspeex/jitter.c
Log:
jitter buffer: check for buffer overflow only when zero-copy is off
Modified: trunk/speex/libspeex/jitter.c
===================================================================
--- trunk/speex/libspeex/jitter.c 2007-11-23 21:55:22 UTC (rev 14224)
+++ trunk/speex/libspeex/jitter.c 2007-11-25 06:00:34 UTC (rev 14225)
@@ -588,17 +588,17 @@
}
- if (jitter->packets[i].len > packet->len)
- {
- speex_warning_int("jitter_buffer_get(): packet too large to fit. Size is", jitter->packets[i].len);
- } else {
- packet->len = jitter->packets[i].len;
- }
/* Copy packet */
if (jitter->destroy)
{
packet->data = jitter->packets[i].data;
} else {
+ if (jitter->packets[i].len > packet->len)
+ {
+ speex_warning_int("jitter_buffer_get(): packet too large to fit. Size is", jitter->packets[i].len);
+ } else {
+ packet->len = jitter->packets[i].len;
+ }
for (j=0;j<packet->len;j++)
packet->data[j] = jitter->packets[i].data[j];
/* Remove packet */
More information about the commits
mailing list