From 8984e18ef778c398c986fd8d9df72bfb819d34c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 4 Mar 2015 11:28:12 +0100 Subject: [PATCH] rtpsession: Add explanation why we have space for 32 hash tables And also create only one, there's no need yet to create all 32 until we implement RFC2762. --- gst/rtpmanager/rtpsession.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c index 23ab4e1c91..cc819fbf10 100644 --- a/gst/rtpmanager/rtpsession.c +++ b/gst/rtpmanager/rtpsession.c @@ -513,7 +513,11 @@ rtp_session_init (RTPSession * sess) sess->mask_idx = 0; sess->mask = 0; - for (i = 0; i < 32; i++) { + /* TODO: We currently only use the first hash table but this is the + * beginning of an implementation for RFC2762 + for (i = 0; i < 32; i++) { + */ + for (i = 0; i < 1; i++) { sess->ssrcs[i] = g_hash_table_new_full (NULL, NULL, NULL, (GDestroyNotify) g_object_unref); @@ -584,7 +588,10 @@ rtp_session_finalize (GObject * object) g_list_free_full (sess->conflicting_addresses, (GDestroyNotify) rtp_conflicting_address_free); - for (i = 0; i < 32; i++) + /* TODO: Change this again when implementing RFC 2762 + * for (i = 0; i < 32; i++) + */ + for (i = 0; i < 1; i++) g_hash_table_destroy (sess->ssrcs[i]); g_mutex_clear (&sess->lock);