mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-23 09:22:21 +08:00
转协议支持全局关闭音频:#883
This commit is contained in:
@@ -22,6 +22,11 @@ static size_t constexpr kMaxUnreadyFrame = 100;
|
||||
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;
|
||||
}
|
||||
lock_guard<recursive_mutex> lck(_mtx);
|
||||
if (_all_track_ready) {
|
||||
WarnL << "all track is ready, add this track too late!";
|
||||
|
||||
Reference in New Issue
Block a user