rtp: Fix bug when using custom RTP timestamps with multiple large NALs in an h26x access unit

This commit is contained in:
Heikki Tampio 2024-03-27 11:40:17 +02:00
parent ee7d4b1f18
commit 0e631832ab
1 changed files with 6 additions and 1 deletions

View File

@ -162,8 +162,13 @@ void uvgrtp::rtp::fill_header(uint8_t *buffer, bool use_old_ts)
*(uint32_t *)&buffer[8] = htonl(*ssrc_.get()); *(uint32_t *)&buffer[8] = htonl(*ssrc_.get());
if (use_old_ts) { if (use_old_ts) {
if (timestamp_ == INVALID_TS) {
*(uint32_t*)&buffer[4] = htonl((u_long)rtp_ts_); *(uint32_t*)&buffer[4] = htonl((u_long)rtp_ts_);
} }
else {
*(uint32_t*)&buffer[4] = htonl((u_long)timestamp_);
}
}
else if (timestamp_ == INVALID_TS) { else if (timestamp_ == INVALID_TS) {
auto t1 = std::chrono::high_resolution_clock::now(); auto t1 = std::chrono::high_resolution_clock::now();