sps pps vps帧不再缓存

This commit is contained in:
xiongziliang 2019-05-13 14:17:55 +08:00
parent a88531354a
commit 35734f9e27
2 changed files with 11 additions and 11 deletions

View File

@ -1,4 +1,4 @@
/*
/*
* MIT License
*
* Copyright (c) 2016-2019 xiongziliang <771730766@qq.com>
@ -313,10 +313,10 @@ private:
if(!_spsFrame){
_spsFrame = std::make_shared<H264Frame>();
_spsFrame->type = H264Frame::NAL_SPS;
_spsFrame->buffer.assign("\x0\x0\x0\x1",4);
_spsFrame->buffer.append(_sps);
_spsFrame->iPrefixSize = 4;
}
_spsFrame->buffer.assign("\x0\x0\x0\x1",4);
_spsFrame->buffer.append(_sps);
_spsFrame->timeStamp = frame->stamp();
VideoTrack::inputFrame(_spsFrame);
}
@ -325,10 +325,10 @@ private:
if(!_ppsFrame) {
_ppsFrame = std::make_shared<H264Frame>();
_ppsFrame->type = H264Frame::NAL_PPS;
_ppsFrame->buffer.assign("\x0\x0\x0\x1",4);
_ppsFrame->buffer.append(_pps);
_ppsFrame->iPrefixSize = 4;
}
_ppsFrame->buffer.assign("\x0\x0\x0\x1",4);
_ppsFrame->buffer.append(_pps);
_ppsFrame->timeStamp = frame->stamp();
VideoTrack::inputFrame(_ppsFrame);
}

View File

@ -263,10 +263,10 @@ private:
if (!_vpsFrame) {
_vpsFrame = std::make_shared<H265Frame>();
_vpsFrame->type = H265Frame::NAL_VPS;
_vpsFrame->buffer.assign("\x0\x0\x0\x1", 4);
_vpsFrame->buffer.append(_vps);
_vpsFrame->iPrefixSize = 4;
}
_vpsFrame->buffer.assign("\x0\x0\x0\x1", 4);
_vpsFrame->buffer.append(_vps);
_vpsFrame->timeStamp = frame->stamp();
VideoTrack::inputFrame(_vpsFrame);
}
@ -274,10 +274,10 @@ private:
if (!_spsFrame) {
_spsFrame = std::make_shared<H265Frame>();
_spsFrame->type = H265Frame::NAL_SPS;
_spsFrame->buffer.assign("\x0\x0\x0\x1", 4);
_spsFrame->buffer.append(_sps);
_spsFrame->iPrefixSize = 4;
}
_spsFrame->buffer.assign("\x0\x0\x0\x1", 4);
_spsFrame->buffer.append(_sps);
_spsFrame->timeStamp = frame->stamp();
VideoTrack::inputFrame(_spsFrame);
}
@ -286,10 +286,10 @@ private:
if (!_ppsFrame) {
_ppsFrame = std::make_shared<H265Frame>();
_ppsFrame->type = H265Frame::NAL_PPS;
_ppsFrame->buffer.assign("\x0\x0\x0\x1", 4);
_ppsFrame->buffer.append(_pps);
_ppsFrame->iPrefixSize = 4;
}
_ppsFrame->buffer.assign("\x0\x0\x0\x1", 4);
_ppsFrame->buffer.append(_pps);
_ppsFrame->timeStamp = frame->stamp();
VideoTrack::inputFrame(_ppsFrame);
}