[xiph-commits] r14144 - trunk/speex/libspeex
jm at svn.xiph.org
jm at svn.xiph.org
Wed Nov 14 23:00:58 PST 2007
Author: jm
Date: 2007-11-14 23:00:57 -0800 (Wed, 14 Nov 2007)
New Revision: 14144
Modified:
trunk/speex/libspeex/jitter.c
Log:
jitter buffer cleanup
Modified: trunk/speex/libspeex/jitter.c
===================================================================
--- trunk/speex/libspeex/jitter.c 2007-11-15 06:31:02 UTC (rev 14143)
+++ trunk/speex/libspeex/jitter.c 2007-11-15 07:00:57 UTC (rev 14144)
@@ -451,19 +451,20 @@
jitter->last_returned_timestamp = jitter->pointer_timestamp;
- if (jitter->interp_requested)
+ if (jitter->interp_requested != 0)
{
- jitter->interp_requested = 0;
if (start_offset)
*start_offset = 0;
packet->timestamp = jitter->pointer_timestamp;
- packet->span = jitter->delay_step;
+ packet->span = jitter->interp_requested;
/* Increment the pointer because it got decremented in the delay update */
- jitter->pointer_timestamp += jitter->delay_step;
+ jitter->pointer_timestamp += jitter->interp_requested;
packet->len = 0;
/*fprintf (stderr, "Deferred interpolate\n");*/
+ jitter->interp_requested = 0;
+
return JITTER_BUFFER_MISSING;
}
@@ -680,7 +681,7 @@
shift_timings(jitter, -opt);
jitter->pointer_timestamp += opt;
- jitter->interp_requested = 1;
+ jitter->interp_requested = -opt;
/*fprintf (stderr, "Decision to interpolate %d samples\n", -opt);*/
return JITTER_BUFFER_ADJUST_INTERPOLATE;
More information about the commits
mailing list