mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 11:51:57 +00:00
RTC: Refine code
This commit is contained in:
parent
4bb3ad5637
commit
aaa3918a72
1 changed files with 5 additions and 2 deletions
|
@ -1297,9 +1297,12 @@ void SrsRtcPublishStream::on_before_decode_payload(SrsRtpPacket2* pkt, SrsBuffer
|
|||
}
|
||||
|
||||
uint32_t ssrc = pkt->header.get_ssrc();
|
||||
if (get_audio_track(ssrc)) {
|
||||
SrsRtcAudioRecvTrack* audio_track = get_audio_track(ssrc);
|
||||
SrsRtcVideoRecvTrack* video_track = get_video_track(ssrc);
|
||||
|
||||
if (audio_track) {
|
||||
*ppayload = new SrsRtpRawPayload();
|
||||
} else if (get_video_track(ssrc)) {
|
||||
} else if (video_track) {
|
||||
uint8_t v = (uint8_t)pkt->nalu_type;
|
||||
if (v == kStapA) {
|
||||
*ppayload = new SrsRtpSTAPPayload();
|
||||
|
|
Loading…
Reference in a new issue