rtpsession: Take the lock already when reading the other stats, not just for the...
authorSebastian Dröge <sebastian@centricular.com>
Sun, 15 May 2016 09:30:50 +0000 (12:30 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Sun, 15 May 2016 09:31:33 +0000 (12:31 +0300)
https://bugzilla.gnome.org/show_bug.cgi?id=766025

gst/rtpmanager/rtpsession.c

index 6e984e7f123117792cc32f9492a7362045fbf5f5..ae34d67c1ad2228f5f12e4056ee42f33fd755570 100644 (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],