diff --git a/src/Record/MP4Muxer.cpp b/src/Record/MP4Muxer.cpp index 3e9045d2..b26f0c36 100644 --- a/src/Record/MP4Muxer.cpp +++ b/src/Record/MP4Muxer.cpp @@ -86,13 +86,7 @@ void MP4MuxerInterface::inputFrame(const Frame::Ptr &frame) { int64_t dts_out, pts_out; switch (frame->getCodecId()) { - case CodecH264: { - int type = H264_TYPE(*((uint8_t *)frame->data() + frame->prefixSize())); - if(type == H264Frame::NAL_SEI){ - break; - } - } - + case CodecH264: case CodecH265: { //这里的代码逻辑是让SPS、PPS、IDR这些时间戳相同的帧打包到一起当做一个帧处理, _frame_merger.inputFrame(frame, [&](uint32_t dts, uint32_t pts, const Buffer::Ptr &buffer, bool have_idr) { diff --git a/src/Record/TsMuxer.cpp b/src/Record/TsMuxer.cpp index 97bb39a8..98948132 100644 --- a/src/Record/TsMuxer.cpp +++ b/src/Record/TsMuxer.cpp @@ -94,13 +94,7 @@ void TsMuxer::inputFrame(const Frame::Ptr &frame) { int64_t dts_out, pts_out; _is_idr_fast_packet = !_have_video; switch (frame->getCodecId()){ - case CodecH264: { - int type = H264_TYPE(*((uint8_t *) frame->data() + frame->prefixSize())); - if (type == H264Frame::NAL_SEI) { - break; - } - } - + case CodecH264: case CodecH265: { //这里的代码逻辑是让SPS、PPS、IDR这些时间戳相同的帧打包到一起当做一个帧处理, _frame_merger.inputFrame(frame, [&](uint32_t dts, uint32_t pts, const Buffer::Ptr &buffer, bool have_idr){ diff --git a/src/Rtp/PSEncoder.cpp b/src/Rtp/PSEncoder.cpp index 6cd39e0a..dc37f9e2 100644 --- a/src/Rtp/PSEncoder.cpp +++ b/src/Rtp/PSEncoder.cpp @@ -117,13 +117,7 @@ void PSEncoder::inputFrame(const Frame::Ptr &frame) { auto &track_info = it->second; int64_t dts_out, pts_out; switch (frame->getCodecId()) { - case CodecH264: { - int type = H264_TYPE(*((uint8_t *) frame->data() + frame->prefixSize())); - if (type == H264Frame::NAL_SEI) { - break; - } - } - + case CodecH264: case CodecH265: { //这里的代码逻辑是让SPS、PPS、IDR这些时间戳相同的帧打包到一起当做一个帧处理, _frame_merger.inputFrame(frame, [&](uint32_t dts, uint32_t pts, const Buffer::Ptr &buffer, bool have_idr) {