From 07c507017a0cbdc0aba8a9f75916aab94397c8d3 Mon Sep 17 00:00:00 2001 From: Jeremy Lakeman Date: Thu, 5 Jul 2012 16:36:11 +0930 Subject: [PATCH] Fix audio stuffing test so it doesn't repeat the same payload --- vomp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vomp.c b/vomp.c index e3f03c33..93c60a9c 100644 --- a/vomp.c +++ b/vomp.c @@ -275,7 +275,8 @@ int vomp_send_status_remote_audio(vomp_call_state *call, int audio_codec, char * rotor--; if (rotor<0) rotor+=VOMP_MAX_RECENT_SAMPLES; rotor%=VOMP_MAX_RECENT_SAMPLES; - if ((!sb[rotor].endtime)||(sb[rotor].endtime==call->audio_clock+1)) break; + // stop if we've run out of samples before we ran out of bytes + if ((!sb[rotor].endtime)||(sb[rotor].endtime+1==call->audio_clock)) break; } call->recent_sample_rotor++; call->recent_sample_rotor%=VOMP_MAX_RECENT_SAMPLES;