Skip to content

Commit

Permalink
RTC: Replace payload name AV1X with AV1 for WebRTC. (ossrs#2760)
Browse files Browse the repository at this point in the history
  • Loading branch information
Huachao committed Dec 10, 2021
1 parent 1a4249d commit 1cbfd15
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions trunk/src/app/srs_app_rtc_conn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2902,7 +2902,7 @@ srs_error_t SrsRtcConnection::negotiate_publish_capability(SrsRtcUserConfig* ruc
break;
}
} else if (remote_media_desc.is_video() && ruc->codec_ == "av1") {
std::vector<SrsMediaPayloadType> payloads = remote_media_desc.find_media_with_encoding_name("AV1X");
std::vector<SrsMediaPayloadType> payloads = remote_media_desc.find_media_with_encoding_name("AV1");
if (payloads.empty()) {
return srs_error_new(ERROR_RTC_SDP_EXCHANGE, "no found valid AV1 payload type");
}
Expand Down Expand Up @@ -3213,13 +3213,13 @@ srs_error_t SrsRtcConnection::negotiate_play_capability(SrsRtcUserConfig* ruc, s
remote_payload = payloads.at(0);
track_descs = source->get_track_desc("audio", "opus");
} else if (remote_media_desc.is_video() && ruc->codec_ == "av1") {
std::vector<SrsMediaPayloadType> payloads = remote_media_desc.find_media_with_encoding_name("AV1X");
std::vector<SrsMediaPayloadType> payloads = remote_media_desc.find_media_with_encoding_name("AV1");
if (payloads.empty()) {
return srs_error_new(ERROR_RTC_SDP_EXCHANGE, "no found valid AV1 payload type");
}

remote_payload = payloads.at(0);
track_descs = source->get_track_desc("video", "AV1X");
track_descs = source->get_track_desc("video", "AV1");
} else if (remote_media_desc.is_video()) {
// TODO: check opus format specific param
vector<SrsMediaPayloadType> payloads = remote_media_desc.find_media_with_encoding_name("H264");
Expand Down

0 comments on commit 1cbfd15

Please sign in to comment.