mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-14 03:55:58 +08:00
优化rtmp性能
This commit is contained in:
@@ -95,9 +95,7 @@ void AACRtmpEncoder::inputFrame(const Frame::Ptr &frame) {
|
||||
}
|
||||
|
||||
if(!_aac_cfg.empty()){
|
||||
RtmpPacket::Ptr rtmpPkt = ResourcePoolHelper<RtmpPacket>::obtainObj();
|
||||
rtmpPkt->buffer.clear();
|
||||
|
||||
auto rtmpPkt = RtmpPacket::create();
|
||||
//header
|
||||
uint8_t is_config = false;
|
||||
rtmpPkt->buffer.push_back(_audio_flv_flags);
|
||||
@@ -117,8 +115,7 @@ void AACRtmpEncoder::inputFrame(const Frame::Ptr &frame) {
|
||||
|
||||
void AACRtmpEncoder::makeAudioConfigPkt() {
|
||||
_audio_flv_flags = getAudioRtmpFlags(std::make_shared<AACTrack>(_aac_cfg));
|
||||
RtmpPacket::Ptr rtmpPkt = ResourcePoolHelper<RtmpPacket>::obtainObj();
|
||||
rtmpPkt->buffer.clear();
|
||||
auto rtmpPkt = RtmpPacket::create();
|
||||
|
||||
//header
|
||||
uint8_t is_config = true;
|
||||
|
||||
Reference in New Issue
Block a user