From: Richard Kettlewell Date: Mon, 17 Sep 2007 18:23:09 +0000 (+0100) Subject: log rtp timestamp updates (which shows that they are wrong) X-Git-Tag: debian-1_5_99dev8~243^2~54 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/commitdiff_plain/dbf24eb489ca9ae6046d1d0048c1f83afeb1e634 log rtp timestamp updates (which shows that they are wrong) --- diff --git a/server/speaker.c b/server/speaker.c index 4e79cdb..f7e2f59 100644 --- a/server/speaker.c +++ b/server/speaker.c @@ -648,9 +648,11 @@ static void play(size_t frames) { struct timeval now; xgettimeofday(&now, 0); /* There's been a gap. Fix up the RTP time accordingly. */ - rtp_time += (((now.tv_sec + now.tv_usec /1000000.0) - - (rtp_time_real.tv_sec + rtp_time_real.tv_usec / 1000000.0)) - * playing->format.rate * playing->format.channels); + const long offset = (((now.tv_sec + now.tv_usec /1000000.0) + - (rtp_time_real.tv_sec + rtp_time_real.tv_usec / 1000000.0)) + * playing->format.rate * playing->format.channels); + info("offset RTP timestamp by %ld", offset); + rtp_time += offset; } header.vpxcc = 2 << 6; /* V=2, P=0, X=0, CC=0 */ header.seq = htons(rtp_seq++);