优化frame性能及整理代码

This commit is contained in:
xia-chu
2021-02-05 11:51:16 +08:00
parent c5cfbce241
commit 62ba87dd0f
33 changed files with 847 additions and 855 deletions

View File

@@ -22,11 +22,8 @@ CodecId CommonRtmpDecoder::getCodecId() const {
}
void CommonRtmpDecoder::obtainFrame() {
//从缓存池重新申请对象,防止覆盖已经写入环形缓存的对象
_frame = ResourcePoolHelper<FrameImp>::obtainObj();
_frame->_buffer.clear();
_frame = FrameImp::create();
_frame->_codec_id = _codec;
_frame->_prefix_size = 0;
}
void CommonRtmpDecoder::inputRtmp(const RtmpPacket::Ptr &rtmp) {