Browse Source

TT#189900 fix SSRC tracking indexing

Don't increase the index pointer before using it. This fixes slots 1 and
2 being filled before slot 0, which ends up filling slots 0 and 2 first
(due to swapping with slot 0), leaving slot 1 empty.

Change-Id: If34cf561fcb153edde6408252c3286c8c80991bc
(cherry picked from commit 6d26df0580)
mr10.5.2
Richard Fuchs 3 years ago
parent
commit
8c3b485d47
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      daemon/media_socket.c

+ 2
- 2
daemon/media_socket.c View File

@ -1684,9 +1684,9 @@ static bool __stream_ssrc_inout(struct packet_stream *ps, uint32_t ssrc, mutex_t
int ctx_idx = __hunt_ssrc_ctx_idx(ssrc, list, 0);
if (ctx_idx == -1) {
// SSRC mismatch - get the new entry:
ctx_idx = *ctx_idx_p;
// move to next slot
ctx_idx = (*ctx_idx_p + 1) % RTPE_NUM_SSRC_TRACKING;
*ctx_idx_p = ctx_idx;
*ctx_idx_p = (*ctx_idx_p + 1) % RTPE_NUM_SSRC_TRACKING;
// eject old entry if present
if (list[ctx_idx])
ssrc_ctx_put(&list[ctx_idx]);


Loading…
Cancel
Save