-
Notifications
You must be signed in to change notification settings - Fork 0
/
fix_rtcp_overflow.diff
22 lines (22 loc) · 1.14 KB
/
fix_rtcp_overflow.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/ice.c b/ice.c
index b6885cc7..d170796b 100644
--- a/ice.c
+++ b/ice.c
@@ -4421,7 +4421,7 @@ static gboolean janus_ice_outgoing_traffic_handle(janus_ice_handle *handle, janu
component->out_stats.audio.bytes_lastsec_temp += pkt->length;
struct timeval tv;
gettimeofday(&tv, NULL);
- if ((gint32)(timestamp - stream->audio_last_rtp_ts) > 0) {
+ if(stream->audio_last_ntp_ts == 0 || (gint32)(timestamp - stream->audio_last_rtp_ts) > 0) {
stream->audio_last_ntp_ts = (gint64)tv.tv_sec*G_USEC_PER_SEC + tv.tv_usec;
stream->audio_last_rtp_ts = timestamp;
}
@@ -4452,7 +4452,7 @@ static gboolean janus_ice_outgoing_traffic_handle(janus_ice_handle *handle, janu
component->out_stats.video[0].bytes_lastsec_temp += pkt->length;
struct timeval tv;
gettimeofday(&tv, NULL);
- if ((gint32)(timestamp - stream->video_last_rtp_ts) > 0) {
+ if(stream->video_last_ntp_ts == 0 || (gint32)(timestamp - stream->video_last_rtp_ts) > 0) {
stream->video_last_ntp_ts = (gint64)tv.tv_sec*G_USEC_PER_SEC + tv.tv_usec;
stream->video_last_rtp_ts = timestamp;
}