From f6e9f359b9bc06febc6297c113ddfbb53234a525 Mon Sep 17 00:00:00 2001 From: Alessandro Decina Date: Mon, 3 May 2010 11:51:37 +0200 Subject: [PATCH] rtpbin: when a stream is created, pause the jitterbuffer if rtpbin is buffering. --- gst/rtpmanager/gstrtpbin.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index bebd23b367..38f703227e 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -1181,6 +1181,15 @@ create_stream (GstRtpBinSession * session, guint32 ssrc) if (demux) gst_element_link (buffer, demux); + if (rtpbin->buffering) { + guint64 last_out; + + GST_INFO_OBJECT (rtpbin, + "bin is buffering, set jitterbuffer as not active"); + g_signal_emit_by_name (buffer, "set-active", FALSE, (gint64) 0, &last_out); + } + + GST_OBJECT_LOCK (rtpbin); target = GST_STATE_TARGET (rtpbin); GST_OBJECT_UNLOCK (rtpbin);