mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
确保静音音频track不影响后续添加的正常音频track
This commit is contained in:
parent
afec4b62b9
commit
e20718fbde
@ -46,6 +46,8 @@ 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;
|
||||
_track_map[track_type] = track;
|
||||
_track_ready_callback[track_type] = [this, track]() {
|
||||
onTrackReady(track);
|
||||
|
Loading…
Reference in New Issue
Block a user