mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-16 13:05:59 +08:00
优化frame性能及整理代码
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user