From 83ee396405d69cf592e1c758f09fb12dc52f1ca1 Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Tue, 14 Sep 2021 16:27:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E5=B1=80=E5=85=B3=E9=97=AD=E9=9F=B3?= =?UTF-8?q?=E9=A2=91=E6=97=B6=EF=BC=8C=E5=8A=A0=E5=BF=AB=E5=8D=95=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E6=B5=81=E6=B3=A8=E5=86=8C=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Common/MediaSink.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Common/MediaSink.cpp b/src/Common/MediaSink.cpp index b372b2f2..9f5ca0ec 100644 --- a/src/Common/MediaSink.cpp +++ b/src/Common/MediaSink.cpp @@ -23,9 +23,13 @@ namespace mediakit{ void MediaSink::addTrack(const Track::Ptr &track_in) { GET_CONFIG(bool, enabel_audio, General::kEnableAudio); - if (!enabel_audio && track_in->getTrackType() == TrackAudio) { - //音频被全局忽略 - return; + if (!enabel_audio) { + //关闭音频时,加快单视频流注册速度 + _max_track_size = 1; + if (track_in->getTrackType() == TrackAudio) { + //音频被全局忽略 + return; + } } lock_guard lck(_mtx); if (_all_track_ready) {