MT#55283 unify types used for sequence numbers

We use int or unsigned int everywhere, except in a few leftover places.
Unify to (unsigned) int.

Change-Id: I0896b2f177957c17b30a3d0cb6b3fb2beb4bd684
(cherry picked from commit f60ee917c9)
mr13.0
Richard Fuchs 7 months ago
parent 68f8af357f
commit cef1401aef

@ -2694,10 +2694,10 @@ static int stream_packet(struct packet_handler_ctx *phc) {
atomic64_inc_na(&phc->mp.ssrc_in->stats->packets);
atomic64_add_na(&phc->mp.ssrc_in->stats->bytes, phc->s.len);
// no real sequencing, so this is rudimentary
uint64_t old_seq = atomic_get_na(&phc->mp.ssrc_in->stats->ext_seq);
uint64_t new_seq = ntohs(phc->mp.rtp->seq_num) | (old_seq & 0xffff0000UL);
unsigned int old_seq = atomic_get_na(&phc->mp.ssrc_in->stats->ext_seq);
unsigned int new_seq = ntohs(phc->mp.rtp->seq_num) | (old_seq & 0xffff0000UL);
// XXX combine this with similar code elsewhere
long seq_diff = new_seq - old_seq;
int seq_diff = new_seq - old_seq;
while (seq_diff < -60000) {
new_seq += 0x10000;
seq_diff += 0x10000;

@ -43,7 +43,7 @@ error:
return -1;
}
static uint64_t packet_index(struct ssrc_ctx *ssrc_ctx, struct rtp_header *rtp) {
static unsigned int packet_index(struct ssrc_ctx *ssrc_ctx, struct rtp_header *rtp) {
uint16_t seq;
seq = ntohs(rtp->seq_num);
@ -103,7 +103,7 @@ void rtp_append_mki(str *s, struct crypto_context *c) {
int rtp_avp2savp(str *s, struct crypto_context *c, struct ssrc_ctx *ssrc_ctx) {
struct rtp_header *rtp;
str payload, to_auth;
uint64_t index;
unsigned int index;
if (G_UNLIKELY(!ssrc_ctx))
return -1;

Loading…
Cancel
Save