rtpsession: Number of active sources should be updated whenever the status of the...
authorPascal Buhler <pascal.buhler@tandberg.com>
Tue, 24 Aug 2010 11:54:58 +0000 (13:54 +0200)
committerOlivier Crête <olivier.crete@collabora.co.uk>
Mon, 11 Apr 2011 21:37:36 +0000 (17:37 -0400)
Forward-ported by Olivier Crête

https://bugzilla.gnome.org/show_bug.cgi?id=646965

gst/rtpmanager/rtpsession.c

index 105ef8c..1850553 100644 (file)
@@ -1939,10 +1939,16 @@ rtp_session_process_sdes (RTPSession * sess, GstRTCPPacket * packet,
     validated = !RTP_SOURCE_IS_ACTIVE (source);
     source->validated = TRUE;
 
+    /* source became active */
+    if (validated) {
+      sess->stats.active_sources++;
+      GST_DEBUG ("source: %08x became active, %d active sources", ssrc,
+          sess->stats.active_sources);
+      on_ssrc_validated (sess, source);
+    }
+
     if (created)
       on_new_ssrc (sess, source);
-    if (validated)
-      on_ssrc_validated (sess, source);
     if (changed)
       on_ssrc_sdes (sess, source);