rtpsession: Take the lock already when reading the other stats, not just for the hash table

https://bugzilla.gnome.org/show_bug.cgi?id=766025
This commit is contained in:
Sebastian Dröge 2016-05-15 12:30:50 +03:00
parent 3320f4f0de
commit fe34f46f32

View file

@ -744,12 +744,12 @@ rtp_session_create_stats (RTPSession * sess)
GValue source_stats_v = G_VALUE_INIT;
guint size;
RTP_SESSION_LOCK (sess);
s = gst_structure_new ("application/x-rtp-session-stats",
"rtx-drop-count", G_TYPE_UINT, sess->stats.nacks_dropped,
"sent-nack-count", G_TYPE_UINT, sess->stats.nacks_sent,
"recv-nack-count", G_TYPE_UINT, sess->stats.nacks_received, NULL);
RTP_SESSION_LOCK (sess);
size = g_hash_table_size (sess->ssrcs[sess->mask_idx]);
source_stats = g_value_array_new (size);
g_hash_table_foreach (sess->ssrcs[sess->mask_idx],