TT#14008 only reset SRTP ROC when doing RTP reset

relevant to #1443

Change-Id: I1d03e121ceeaf70268718f233871b96ba4112120
(cherry picked from commit a6ebb70789)
mr10.2
Richard Fuchs 4 years ago
parent 1e2d3e4d3b
commit 0058f782e0

@ -1147,21 +1147,23 @@ void call_stream_crypto_reset(struct packet_stream *ps) {
crypto_reset(&ps->crypto); crypto_reset(&ps->crypto);
mutex_lock(&ps->in_lock); if (PS_ISSET(ps, RTP)) {
for (unsigned int u = 0; u < G_N_ELEMENTS(ps->ssrc_in); u++) { mutex_lock(&ps->in_lock);
if (!ps->ssrc_in[u]) // end of list for (unsigned int u = 0; u < G_N_ELEMENTS(ps->ssrc_in); u++) {
break; if (!ps->ssrc_in[u]) // end of list
ps->ssrc_in[u]->srtp_index = 0; break;
} ps->ssrc_in[u]->srtp_index = 0;
mutex_unlock(&ps->in_lock); }
mutex_unlock(&ps->in_lock);
mutex_lock(&ps->out_lock); mutex_lock(&ps->out_lock);
for (unsigned int u = 0; u < G_N_ELEMENTS(ps->ssrc_out); u++) { for (unsigned int u = 0; u < G_N_ELEMENTS(ps->ssrc_out); u++) {
if (!ps->ssrc_out[u]) // end of list if (!ps->ssrc_out[u]) // end of list
break; break;
ps->ssrc_out[u]->srtp_index = 0; ps->ssrc_out[u]->srtp_index = 0;
}
mutex_unlock(&ps->out_lock);
} }
mutex_unlock(&ps->out_lock);
} }
/* called with call locked in R or W, but ps not locked */ /* called with call locked in R or W, but ps not locked */

Loading…
Cancel
Save