mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 10:40:05 +08:00
完善添加静音音频相关功能
This commit is contained in:
parent
e20718fbde
commit
c493f0da1b
@ -46,8 +46,10 @@ bool MediaSink::addTrack(const Track::Ptr &track_in) {
|
||||
//克隆Track,只拷贝其数据,不拷贝其数据转发关系
|
||||
auto track = track_in->clone();
|
||||
auto track_type = track->getTrackType();
|
||||
//确保添加非静音音频track时,取消之前的静音音频track
|
||||
_mute_audio_maker = nullptr;
|
||||
if (track_type == TrackAudio) {
|
||||
//确保添加非静音音频track时,取消之前的静音音频track
|
||||
_mute_audio_maker = nullptr;
|
||||
}
|
||||
_track_map[track_type] = track;
|
||||
_track_ready_callback[track_type] = [this, track]() {
|
||||
onTrackReady(track);
|
||||
|
Loading…
Reference in New Issue
Block a user