mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-23 03:10:04 +08:00
for h264 pps sps aud sei not check first_mb_in_slice
This commit is contained in:
parent
1920802764
commit
3429690d75
@ -191,7 +191,8 @@ bool FrameMerger::willFlush(const Frame::Ptr &frame) const{
|
|||||||
}
|
}
|
||||||
switch (frame->getCodecId()) {
|
switch (frame->getCodecId()) {
|
||||||
case CodecH264 : {
|
case CodecH264 : {
|
||||||
if (frame->data()[frame->prefixSize()+1]&0x80 !=0) {
|
auto type = H264_TYPE(frame->data()[frame->prefixSize()]);
|
||||||
|
if (frame->data()[frame->prefixSize()+1]&0x80 !=0 && type >=H264Frame::NAL_B_P && type<=H264Frame::NAL_IDR ) {// sei aud pps sps 不判断
|
||||||
//264 新一帧的开始,刷新输出
|
//264 新一帧的开始,刷新输出
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
|
@ -183,7 +183,7 @@ void H264RtmpEncoder::inputFrame(const Frame::Ptr &frame) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_lastPacket && (_lastPacket->time_stamp != frame->dts() || pcData[1]&0x80 != 0)) {
|
if(_lastPacket && (_lastPacket->time_stamp != frame->dts() || (pcData[1]&0x80 != 0 && type>=H264Frame::NAL_B_P && type<=H264Frame::NAL_IDR))) {
|
||||||
RtmpCodec::inputRtmp(_lastPacket);
|
RtmpCodec::inputRtmp(_lastPacket);
|
||||||
_lastPacket = nullptr;
|
_lastPacket = nullptr;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user