mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-23 03:10:04 +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) {
|
void MediaSink::addTrack(const Track::Ptr &track_in) {
|
||||||
GET_CONFIG(bool, enabel_audio, General::kEnableAudio);
|
GET_CONFIG(bool, enabel_audio, General::kEnableAudio);
|
||||||
if (!enabel_audio && track_in->getTrackType() == TrackAudio) {
|
if (!enabel_audio) {
|
||||||
//音频被全局忽略
|
//关闭音频时,加快单视频流注册速度
|
||||||
return;
|
_max_track_size = 1;
|
||||||
|
if (track_in->getTrackType() == TrackAudio) {
|
||||||
|
//音频被全局忽略
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
lock_guard<recursive_mutex> lck(_mtx);
|
lock_guard<recursive_mutex> lck(_mtx);
|
||||||
if (_all_track_ready) {
|
if (_all_track_ready) {
|
||||||
|
Loading…
Reference in New Issue
Block a user