webrtc codec类型不支持时,设置为inactive类型

This commit is contained in:
ziyue 2021-10-15 16:15:23 +08:00
parent a408197493
commit 8531b5e1cb

View File

@ -1707,7 +1707,9 @@ RETRY:
default: continue;
}
answer_media.direction = matchDirection(offer_media.direction, configure.direction);
//如果codec匹配失败那么禁用该track
answer_media.direction = check_codec ? matchDirection(offer_media.direction, configure.direction)
: RtpDirection::inactive;
if (answer_media.direction == RtpDirection::invalid) {
continue;
}