优化rtmp性能

This commit is contained in:
xia-chu
2021-02-04 17:58:51 +08:00
parent 827158af73
commit bc6286553a
19 changed files with 88 additions and 72 deletions

View File

@@ -49,8 +49,7 @@ void CommonRtmpEncoder::inputFrame(const Frame::Ptr &frame) {
if (!_audio_flv_flags) {
return;
}
RtmpPacket::Ptr rtmp = ResourcePoolHelper<RtmpPacket>::obtainObj();
rtmp->buffer.clear();
auto rtmp = RtmpPacket::create();
//header
rtmp->buffer.push_back(_audio_flv_flags);
//data