Skip to content

Commit d777d3f

Browse files
committed
basertpendpoint.c: Do not use SR packages data if packet count is 0
Change-Id: I2dba4da96d48968451676d56dbfbe359c0545893
1 parent cf61299 commit d777d3f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/gst-plugins/commons/kmsbasertpendpoint.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2014,6 +2014,7 @@ rtcp_probe (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
20142014
GstRTCPType type;
20152015
guint32 ssrc, rtptime;
20162016
guint64 ntptime, ntpnstime;
2017+
guint32 packet_count;
20172018
SsrcSyncData *sync_data;
20182019

20192020
if (!gst_rtcp_buffer_get_first_packet (&rtcp, &packet)) {
@@ -2029,7 +2030,13 @@ rtcp_probe (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
20292030
}
20302031

20312032
gst_rtcp_packet_sr_get_sender_info (&packet, &ssrc, &ntptime, &rtptime,
2032-
NULL, NULL);
2033+
&packet_count, NULL);
2034+
2035+
if (packet_count == 0) {
2036+
GST_ERROR_OBJECT (self,
2037+
"Received RTCP SR package without previous RTP, ignoring");
2038+
goto unmap;
2039+
}
20332040

20342041
if (ssrc == self->priv->sess->remote_video_ssrc) {
20352042
sync_data = &self->priv->video_sync;

0 commit comments

Comments
 (0)