1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

WHIP: Fix bug for converting WHIP to RTMP/HLS. v5.0.208 v6.0.113 (#3920)

1. When converting RTC to RTMP, it is necessary to synchronize the audio
and video timestamps. When the synchronization status changes, whether
it is unsynchronized or synchronized, print logs to facilitate
troubleshooting of such issues.
2. Chrome uses the STAP-A packet, which means a single RTP packet
contains SPS/PPS information. OBS WHIP, on the other hand, sends SPS and
PPS in separate RTP packets. Therefore, SPS and PPS are in two
independent RTP packets, and SRS needs to cache these two packets.

---------

Co-authored-by: john <hondaxiao@tencent.com>
This commit is contained in:
Winlin 2024-02-06 14:06:34 +08:00 committed by GitHub
parent 22c2469414
commit 7209b73660
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 101 additions and 36 deletions

View file

@ -970,12 +970,14 @@ SrsRtpRawPayload::SrsRtpRawPayload()
{
payload = NULL;
nn_payload = 0;
sample_ = new SrsSample();
++_srs_pps_objs_rraw->sugar;
}
SrsRtpRawPayload::~SrsRtpRawPayload()
{
srs_freep(sample_);
}
uint64_t SrsRtpRawPayload::nb_bytes()
@ -1007,6 +1009,9 @@ srs_error_t SrsRtpRawPayload::decode(SrsBuffer* buf)
payload = buf->head();
nn_payload = buf->left();
sample_->bytes = payload;
sample_->size = nn_payload;
return srs_success;
}
@ -1016,6 +1021,7 @@ ISrsRtpPayloader* SrsRtpRawPayload::copy()
cp->payload = payload;
cp->nn_payload = nn_payload;
cp->sample_ = sample_->copy();
return cp;
}