Skip to content

Commit

Permalink
rtp: Fix bug when using custom RTP timestamps with multiple large NAL…
Browse files Browse the repository at this point in the history
…s in an h26x access unit
  • Loading branch information
tampsa committed Mar 27, 2024
1 parent ee7d4b1 commit 0e63183
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/rtp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,12 @@ void uvgrtp::rtp::fill_header(uint8_t *buffer, bool use_old_ts)
*(uint32_t *)&buffer[8] = htonl(*ssrc_.get());

if (use_old_ts) {
*(uint32_t*)&buffer[4] = htonl((u_long)rtp_ts_);
if (timestamp_ == INVALID_TS) {
*(uint32_t*)&buffer[4] = htonl((u_long)rtp_ts_);
}
else {
*(uint32_t*)&buffer[4] = htonl((u_long)timestamp_);
}
}
else if (timestamp_ == INVALID_TS) {

Expand Down

0 comments on commit 0e63183

Please sign in to comment.