Skip to content

Commit

Permalink
Fix unexpected timout due to race condition, I think, on the timing.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebrady committed Oct 20, 2014
1 parent eef08e4 commit b64d345
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions player.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))) {
Expand Down

0 comments on commit b64d345

Please sign in to comment.