mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 20:47:08 +08:00
fix webrtc to rtmp multi slice on frame error
This commit is contained in:
parent
d74779dc02
commit
0f3a8f4a9d
@ -183,7 +183,7 @@ void H264RtmpEncoder::inputFrame(const Frame::Ptr &frame) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_lastPacket && (_lastPacket->time_stamp != frame->dts() || type == H264Frame::NAL_B_P)) {
|
if(_lastPacket && (_lastPacket->time_stamp != frame->dts() || pcData[1]&0x80 != 0)) {
|
||||||
RtmpCodec::inputRtmp(_lastPacket);
|
RtmpCodec::inputRtmp(_lastPacket);
|
||||||
_lastPacket = nullptr;
|
_lastPacket = nullptr;
|
||||||
}
|
}
|
||||||
@ -214,10 +214,12 @@ void H264RtmpEncoder::inputFrame(const Frame::Ptr &frame) {
|
|||||||
_lastPacket->buffer.append((char *) &size, 4);
|
_lastPacket->buffer.append((char *) &size, 4);
|
||||||
_lastPacket->buffer.append(pcData, iLen);
|
_lastPacket->buffer.append(pcData, iLen);
|
||||||
_lastPacket->body_size = _lastPacket->buffer.size();
|
_lastPacket->body_size = _lastPacket->buffer.size();
|
||||||
|
/*
|
||||||
if (type == H264Frame::NAL_B_P) {
|
if (type == H264Frame::NAL_B_P) {
|
||||||
RtmpCodec::inputRtmp(_lastPacket);
|
RtmpCodec::inputRtmp(_lastPacket);
|
||||||
_lastPacket = nullptr;
|
_lastPacket = nullptr;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void H264RtmpEncoder::makeVideoConfigPkt() {
|
void H264RtmpEncoder::makeVideoConfigPkt() {
|
||||||
|
Loading…
Reference in New Issue
Block a user