mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
Merge branch '4.0release' into merge/develop
This commit is contained in:
commit
cc1cab2803
2 changed files with 3 additions and 6 deletions
|
@ -1965,7 +1965,9 @@ void SrsRtcVideoRecvTrack::on_before_decode_payload(SrsRtpPacket2* pkt, SrsBuffe
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t v = (uint8_t)pkt->nalu_type;
|
uint8_t v = (uint8_t)(buf->head()[0] & kNalTypeMask);
|
||||||
|
pkt->nalu_type = SrsAvcNaluType(v);
|
||||||
|
|
||||||
if (v == kStapA) {
|
if (v == kStapA) {
|
||||||
*ppayload = new SrsRtpSTAPPayload();
|
*ppayload = new SrsRtpSTAPPayload();
|
||||||
*ppt = SrsRtpPacketPayloadTypeSTAP;
|
*ppt = SrsRtpPacketPayloadTypeSTAP;
|
||||||
|
|
|
@ -1035,11 +1035,6 @@ srs_error_t SrsRtpPacket2::decode(SrsBuffer* buf)
|
||||||
}
|
}
|
||||||
buf->set_size(buf->size() - padding);
|
buf->set_size(buf->size() - padding);
|
||||||
|
|
||||||
// Try to parse the NALU type for video decoder.
|
|
||||||
if (!buf->empty()) {
|
|
||||||
nalu_type = SrsAvcNaluType((uint8_t)(buf->head()[0] & kNalTypeMask));
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: FIXME: We should keep payload to NULL and return if buffer is empty.
|
// TODO: FIXME: We should keep payload to NULL and return if buffer is empty.
|
||||||
// If user set the decode handler, call it to set the payload.
|
// If user set the decode handler, call it to set the payload.
|
||||||
if (decode_handler) {
|
if (decode_handler) {
|
||||||
|
|
Loading…
Reference in a new issue