debug(1, "Large positive sync error of: %" PRId64 " frames (%f seconds).",
sync_error, (sync_error * 1.0) / config.output_rate);
int64_t local_frames_to_drop = sync_error / conn->output_sample_ratio;
- uint32_t frames_to_drop_sized = local_frames_to_drop;
-
- debug_mutex_lock(&conn->flush_mutex, 1000, 1);
- conn->flush_rtp_timestamp =
- inframe->given_timestamp +
- frames_to_drop_sized; // flush all packets up to (and including?) this
- reset_input_flow_metrics(conn);
- debug_mutex_unlock(&conn->flush_mutex, 3);
-
+ uint32_t frames_to_drop_sized = local_frames_to_drop;
+ do_flush(inframe->given_timestamp + frames_to_drop_sized, conn);
} else if ((sync_error < 0) && ((-sync_error) > filler_length)) {
debug(1,
"Large negative sync error of: %" PRId64