mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-16 04:55:58 +08:00
优化代码
This commit is contained in:
@@ -59,7 +59,7 @@ void RtpSession::onManager() {
|
||||
void RtpSession::onRtpPacket(const char *data, uint64_t len) {
|
||||
if (!_process) {
|
||||
uint32_t ssrc;
|
||||
if (!RtpSelector::getSSRC(data + 2, len - 2, ssrc)) {
|
||||
if (!RtpSelector::getSSRC(data, len, ssrc)) {
|
||||
return;
|
||||
}
|
||||
if (_stream_id.empty()) {
|
||||
@@ -70,7 +70,7 @@ void RtpSession::onRtpPacket(const char *data, uint64_t len) {
|
||||
_process = RtpSelector::Instance().getProcess(_stream_id, true);
|
||||
_process->setListener(dynamic_pointer_cast<RtpSession>(shared_from_this()));
|
||||
}
|
||||
_process->inputRtp(getSock(), data + 2, len - 2, &addr);
|
||||
_process->inputRtp(getSock(), data, len, &addr);
|
||||
_ticker.resetTime();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user