MT#55283 don't evict objects still in use

If a SSRC object is still in use (refcount is >1), keep it in the list,
even if the list is too large.

Otherwise we may end up recreating a new SSRC object for the same SSRC
that still has an object in use elsewhere, making locks unreliable.

Ref #2148

Change-Id: I2afd277696e05c356fc9cf5aea59f51e1fba0784
(cherry picked from commit 26fee2610a)
(cherry picked from commit df969ecfe3)
mr26.0.1
Richard Fuchs 1 week ago
parent 185bbd23d5
commit 4a1d15758e

@ -227,6 +227,8 @@ void *get_ssrc_full(uint32_t ssrc, struct ssrc_hash *ht, bool *created) {
while (G_UNLIKELY(ht->nq.length > MAX_SSRC_ENTRIES)) {
GList *link = g_queue_pop_tail_link(&ht->nq);
struct ssrc_entry *old_ent = link->data;
if (old_ent->obj.ref != 1)
break;
ilog(LOG_DEBUG, "SSRC hash table exceeded size limit (trying to add %s%x%s) - "
"deleting SSRC %s%x%s",
FMT_M(ssrc), FMT_M(old_ent->ssrc));

Loading…
Cancel
Save