The duration of the first packet was being calculated incorrectly, leading to an incorrect timestamp offset.