mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
全局关闭音频时,加快单视频流注册速度
This commit is contained in:
parent
8af98817e1
commit
83ee396405
@ -23,10 +23,14 @@ namespace mediakit{
|
||||
|
||||
void MediaSink::addTrack(const Track::Ptr &track_in) {
|
||||
GET_CONFIG(bool, enabel_audio, General::kEnableAudio);
|
||||
if (!enabel_audio && track_in->getTrackType() == TrackAudio) {
|
||||
if (!enabel_audio) {
|
||||
//关闭音频时,加快单视频流注册速度
|
||||
_max_track_size = 1;
|
||||
if (track_in->getTrackType() == TrackAudio) {
|
||||
//音频被全局忽略
|
||||
return;
|
||||
}
|
||||
}
|
||||
lock_guard<recursive_mutex> lck(_mtx);
|
||||
if (_all_track_ready) {
|
||||
WarnL << "all track is ready, add this track too late!";
|
||||
|
Loading…
Reference in New Issue
Block a user