summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/module-echo-cancel.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/modules/module-echo-cancel.c b/src/modules/module-echo-cancel.c
index 64f21adf0..3d7a6efbf 100644
--- a/src/modules/module-echo-cancel.c
+++ b/src/modules/module-echo-cancel.c
@@ -272,7 +272,7 @@ static void time_callback(pa_mainloop_api *a, pa_time_event *e, const struct tim
new_rate = base_rate;
}
else {
- if (diff_time > u->frame_size_ms * 1000) {
+ if (diff_time > (u->frame_size_ms / 2) * 1000) {
pa_log_info("playback too far ahead (%lld), realign", (long long) diff_time);
/* diff too big, quickly adjust */
pa_asyncmsgq_post(u->asyncmsgq, PA_MSGOBJECT(u->source_output), SOURCE_OUTPUT_MESSAGE_APPLY_DIFF_TIME,
@@ -740,7 +740,6 @@ static void source_output_process_rewind_cb(pa_source_output *o, size_t nbytes)
/* go back on read side, we need to use older sink data for this */
pa_memblockq_rewind(u->sink_memblockq, nbytes);
- u->recv_counter -= nbytes;
/* manipulate write index */
pa_memblockq_seek(u->source_memblockq, -nbytes, PA_SEEK_RELATIVE, TRUE);