Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Change-Id: I74e2a1f097d6da7de4af31bcb6a99a75a20002a9
  • Loading branch information
rfuchs committed Jul 28, 2023
1 parent 85b8a76 commit fde9499
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions daemon/codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1677,6 +1677,17 @@ static int handler_func_passthrough(struct codec_handler *h, struct media_packet
ts = ntohl(mp->rtp->timestamp);
codec_calc_jitter(mp->ssrc_in, ts, h->source_pt.clock_rate, &mp->tv);
codec_calc_lost(mp->ssrc_in, ntohs(mp->rtp->seq_num));

uint16_t seq = ntohs(mp->rtp->seq_num);
bool pass = true;
if (seq == mp->ssrc_in->next_check_seq) {
if (ts < mp->ssrc_in->next_rtp_ts)
pass = false;
}
mp->ssrc_in->next_check_seq = seq + 1;
mp->ssrc_in->next_rtp_ts = ts + mp->payload.len;
if (!pass)
return 0;
}

mp->media->monologue->dtmf_injection_active = 0;
Expand Down
3 changes: 3 additions & 0 deletions include/ssrc.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ struct ssrc_ctx {
sample_duplicates;

struct timeval next_rtcp; // for self-generated RTCP reports

uint16_t next_check_seq;
uint32_t next_rtp_ts;
};

INLINE uint64_t ssrc_timeval_to_ts(const struct timeval *tv) {
Expand Down

0 comments on commit fde9499

Please sign in to comment.