mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +08:00
全局关闭音频时,加快单视频流注册速度
This commit is contained in:
parent
8af98817e1
commit
83ee396405
@ -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<recursive_mutex> lck(_mtx);
|
||||
if (_all_track_ready) {
|
||||
|
Loading…
Reference in New Issue
Block a user