rtpbin: use max-streams on rtpssrcdemux
authorMikhail Fludkov <misha@pexip.com>
Wed, 14 Sep 2016 14:49:26 +0000 (16:49 +0200)
committerHavard Graff <havard@pexip.com>
Tue, 11 Feb 2020 14:12:07 +0000 (15:12 +0100)
The proper way of capping on max-streams is to do it in rtpssrcdemux.
This patch uses the newly introduced property on rtpssrcdemux. Previous
behavior would not prevent rtpssrcdemux spawning new pads for every new
ssrc and potentialy causing performance trouble during teardown.

gst/rtpmanager/gstrtpbin.c

index 1bb521a..a04a157 100644 (file)
@@ -701,6 +701,7 @@ create_session (GstRtpBin * rtpbin, gint id)
 
   /* configure SDES items */
   GST_OBJECT_LOCK (rtpbin);
+  g_object_set (demux, "max-streams", rtpbin->max_streams, NULL);
   g_object_set (session, "sdes", rtpbin->sdes, "rtp-profile",
       rtpbin->rtp_profile, "rtcp-sync-send-time", rtpbin->rtcp_sync_send_time,
       NULL);