Skip to content

Commit

Permalink
upipe_rtp_reorder: drop non-rtp packets
Browse files Browse the repository at this point in the history
  • Loading branch information
nto committed Apr 9, 2024
1 parent 02cf846 commit c292fb8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/upipe-modules/upipe_rtp_reorder.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,14 @@ static void upipe_rtpr_list_add(struct upipe *upipe, struct uref *uref)
uref_free(uref);
return;
}
uint16_t new_seqnum = rtp_get_seqnum(rtp_header);
uref_attr_set_priv(uref, new_seqnum);
bool is_rtp = rtp_check_hdr(rtp_header);
uint16_t new_seqnum = likely(is_rtp) ? rtp_get_seqnum(rtp_header) : 0;
uref_block_peek_unmap(uref, 0, rtp_buffer, rtp_header);
if (unlikely(!is_rtp)) {
uref_free(uref);
return;
}
uref_attr_set_priv(uref, new_seqnum);

/* Drop late packets */
if (rtpr->last_sent_seqnum != UINT64_MAX &&
Expand Down

0 comments on commit c292fb8

Please sign in to comment.