diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c index c9beff727d..a445be97e5 100644 --- a/gst/rtpmanager/gstrtpsession.c +++ b/gst/rtpmanager/gstrtpsession.c @@ -1614,6 +1614,7 @@ gst_rtp_session_chain_recv_rtp (GstPad * pad, GstObject * parent, GstFlowReturn ret; GstClockTime current_time, running_time; GstClockTime timestamp; + guint64 ntpnstime; rtpsession = GST_RTP_SESSION (parent); priv = rtpsession->priv; @@ -1627,13 +1628,14 @@ gst_rtp_session_chain_recv_rtp (GstPad * pad, GstObject * parent, running_time = gst_segment_to_running_time (&rtpsession->recv_rtp_seg, GST_FORMAT_TIME, timestamp); + ntpnstime = GST_CLOCK_TIME_NONE; } else { - get_current_times (rtpsession, &running_time, NULL); + get_current_times (rtpsession, &running_time, &ntpnstime); } current_time = gst_clock_get_time (priv->sysclock); ret = rtp_session_process_rtp (priv->session, buffer, current_time, - running_time); + running_time, ntpnstime); if (ret != GST_FLOW_OK) goto push_error; diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c index b68c8b182c..d06ad26cee 100644 --- a/gst/rtpmanager/rtpsession.c +++ b/gst/rtpmanager/rtpsession.c @@ -1712,7 +1712,7 @@ source_update_sender (RTPSession * sess, RTPSource * source, */ GstFlowReturn rtp_session_process_rtp (RTPSession * sess, GstBuffer * buffer, - GstClockTime current_time, GstClockTime running_time) + GstClockTime current_time, GstClockTime running_time, guint64 ntpnstime) { GstFlowReturn result; guint32 ssrc; @@ -1729,8 +1729,11 @@ rtp_session_process_rtp (RTPSession * sess, GstBuffer * buffer, /* update pinfo stats */ if (!update_packet_info (sess, &pinfo, FALSE, TRUE, FALSE, buffer, - current_time, running_time, -1)) - goto invalid_packet; + current_time, running_time, ntpnstime)) { + GST_DEBUG ("invalid RTP packet received"); + RTP_SESSION_UNLOCK (sess); + return rtp_session_process_rtcp (sess, buffer, current_time, ntpnstime); + } ssrc = pinfo.ssrc; @@ -1791,13 +1794,6 @@ rtp_session_process_rtp (RTPSession * sess, GstBuffer * buffer, return result; /* ERRORS */ -invalid_packet: - { - gst_buffer_unref (buffer); - RTP_SESSION_UNLOCK (sess); - GST_DEBUG ("invalid RTP packet received"); - return GST_FLOW_OK; - } collision: { RTP_SESSION_UNLOCK (sess); diff --git a/gst/rtpmanager/rtpsession.h b/gst/rtpmanager/rtpsession.h index c8dee20453..3ca6c161e2 100644 --- a/gst/rtpmanager/rtpsession.h +++ b/gst/rtpmanager/rtpsession.h @@ -333,7 +333,8 @@ RTPSource* rtp_session_create_source (RTPSession *sess); /* processing packets from receivers */ GstFlowReturn rtp_session_process_rtp (RTPSession *sess, GstBuffer *buffer, GstClockTime current_time, - GstClockTime running_time); + GstClockTime running_time, + guint64 ntpnstime); GstFlowReturn rtp_session_process_rtcp (RTPSession *sess, GstBuffer *buffer, GstClockTime current_time, guint64 ntpnstime);