From b64d345892f6bee4d02a92ea866dd1d610d71417 Mon Sep 17 00:00:00 2001 From: Mike Brady Date: Mon, 20 Oct 2014 11:55:24 +0100 Subject: [PATCH] Fix unexpected timout due to race condition, I think, on the timing. --- player.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/player.c b/player.c index a60557b2..8b979035 100644 --- a/player.c +++ b/player.c @@ -298,10 +298,9 @@ static void free_buffer(void) { void player_put_packet(seq_t seqno,uint32_t timestamp, uint8_t *data, int len) { packet_count++; - time_of_last_audio_packet = get_absolute_time_in_fp(); pthread_mutex_lock(&ab_mutex); - + time_of_last_audio_packet = get_absolute_time_in_fp(); if (connection_state_to_output) { // if we are supposed to be processing these packets if ((flush_rtp_timestamp!=0x7fffffff) && ((timestamp==flush_rtp_timestamp) || seq32_order(timestamp,flush_rtp_timestamp))) {