rtpsession: only delay RTCP when we are a sender
authorWim Taymans <wim.taymans@collabora.co.uk>
Wed, 20 Feb 2013 19:03:27 +0000 (21:03 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Wed, 20 Feb 2013 19:07:41 +0000 (21:07 +0200)
Only delay the RTCP thread when we are a sender, which we can know because we
have a send_rtp_src pad. Otherwise we might delay the RTCP thread if we
are only a receiver and then there is no code path that wakes up the
RTCP thread and we end up without RTCP packets.

gst/rtpmanager/gstrtpsession.c

index 03b9607..5d641ad 100644 (file)
@@ -978,7 +978,8 @@ gst_rtp_session_change_state (GstElement * element, GstStateChange transition)
       break;
     case GST_STATE_CHANGE_READY_TO_PAUSED:
       GST_RTP_SESSION_LOCK (rtpsession);
-      rtpsession->priv->wait_send = TRUE;
+      if (rtpsession->send_rtp_src)
+        rtpsession->priv->wait_send = TRUE;
       GST_RTP_SESSION_UNLOCK (rtpsession);
       break;
     case GST_STATE_CHANGE_PAUSED_TO_PLAYING: