H264Track不过滤SEI: #411

This commit is contained in:
xiongziliang
2020-07-16 16:26:13 +08:00
parent c612f291db
commit c31b0cc26b
4 changed files with 17 additions and 11 deletions

View File

@@ -166,6 +166,9 @@ void H264RtmpEncoder::inputFrame(const Frame::Ptr &frame) {
auto pcData = frame->data() + frame->prefixSize();
auto iLen = frame->size() - frame->prefixSize();
auto type = H264_TYPE(((uint8_t*)pcData)[0]);
if(type == H264Frame::NAL_SEI){
return;
}
if (!_gotSpsPps) {
//尝试从frame中获取sps pps
@@ -187,10 +190,6 @@ void H264RtmpEncoder::inputFrame(const Frame::Ptr &frame) {
}
}
if(type == H264Frame::NAL_SEI){
return;
}
if(_lastPacket && _lastPacket->timeStamp != frame->dts()) {
RtmpCodec::inputRtmp(_lastPacket, _lastPacket->isVideoKeyFrame());
_lastPacket = nullptr;