From e20718fbde93ba0b9aa619dfa8dc1b1ca05bfd60 Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Mon, 27 Sep 2021 13:27:07 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A1=AE=E4=BF=9D=E9=9D=99=E9=9F=B3=E9=9F=B3?= =?UTF-8?q?=E9=A2=91track=E4=B8=8D=E5=BD=B1=E5=93=8D=E5=90=8E=E7=BB=AD?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=9A=84=E6=AD=A3=E5=B8=B8=E9=9F=B3=E9=A2=91?= =?UTF-8?q?track?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Common/MediaSink.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Common/MediaSink.cpp b/src/Common/MediaSink.cpp index eb58d32b..0e8ee018 100644 --- a/src/Common/MediaSink.cpp +++ b/src/Common/MediaSink.cpp @@ -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);