mgcp: Remember the initial sequence number of the stream
This information is required for calculating the packet loss at the end of a phone call.
This commit is contained in:
parent
952f752ffa
commit
2e8e659586
|
@ -46,6 +46,7 @@ struct mgcp_rtp_state {
|
|||
|
||||
uint32_t orig_ssrc;
|
||||
uint32_t ssrc;
|
||||
int first_seq_no;
|
||||
uint16_t seq_no;
|
||||
int seq_offset;
|
||||
uint32_t last_timestamp;
|
||||
|
|
|
@ -120,6 +120,7 @@ static void patch_and_count(struct mgcp_endpoint *endp, struct mgcp_rtp_state *s
|
|||
timestamp = ntohl(rtp_hdr->timestamp);
|
||||
|
||||
if (!state->initialized) {
|
||||
state->first_seq_no = seq;
|
||||
state->seq_no = seq - 1;
|
||||
state->ssrc = state->orig_ssrc = rtp_hdr->ssrc;
|
||||
state->initialized = 1;
|
||||
|
|
Loading…
Reference in New Issue