profile匹配失败时,优先选择相同编码格式的方案

This commit is contained in:
xiongziliang 2021-04-06 23:22:22 +08:00
parent 204ef6e204
commit c9a20eda16

View File

@ -1357,11 +1357,11 @@ RETRY:
}
const RtcCodecPlan *offer_plan_ptr = nullptr;
for (auto &plan : offer_media.plan) {
if (getCodecId(plan.codec) != codec) {
continue;
}
//如果匹配失败了那么随便选择一个plan
if (!failed) {
//如果匹配失败了那么随便选择一个plan
if (getCodecId(plan.codec) != codec) {
continue;
}
//命中偏好的编码格式
if (!onMatchCodecPlan(plan, codec)) {
continue;