mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
由于frame merge时已经过滤无效帧,所以移除多余代码
This commit is contained in:
parent
59131e3b0a
commit
03addaf0b7
@ -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) {
|
||||
|
@ -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){
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user