Fix an off-by-one bug causing excessive resend requests.

This commit is contained in:
Mike Brady
2018-05-17 10:58:22 +01:00
parent 8a5a29e2c2
commit a8cd696f8d
+1 -1
View File
@@ -535,7 +535,7 @@ void player_put_packet(seq_t seqno, uint32_t actual_timestamp, int64_t timestamp
int k;
for (k = -2; k <= 2; k++) {
if ((back_step + k) < sd) { // if it's within the range of frames in use...
int item_to_check = (conn->ab_write - back_step + k) & 0xffff;
int item_to_check = (conn->ab_write - (back_step + k)) & 0xffff;
seq_t next = item_to_check;
abuf_t *check_buf = conn->audio_buffer + BUFIDX(next);
if ((!check_buf->ready) &&