diff --git a/trunk/src/app/srs_app_rtc_conn.cpp b/trunk/src/app/srs_app_rtc_conn.cpp index 72fabbb85..5860578f9 100644 --- a/trunk/src/app/srs_app_rtc_conn.cpp +++ b/trunk/src/app/srs_app_rtc_conn.cpp @@ -2989,8 +2989,17 @@ srs_error_t SrsRtcConnection::negotiate_play_capability(SrsRequest* req, const S SrsRtcTrackDescription* track = track_descs[i]->copy(); // Use remote/source/offer PayloadType. + track->media_->pt_of_publisher_ = track->media_->pt_; track->media_->pt_ = remote_payload.payload_type_; + vector red_pts = remote_media_desc.find_media_with_encoding_name("red"); + if (!red_pts.empty() && !track->red_) { + SrsMediaPayloadType red_pt = red_pts.at(0); + + track->red_->pt_of_publisher_ = track->red_->pt_; + track->red_->pt_ = red_pt.payload_type_; + } + track->mid_ = remote_media_desc.mid_; uint32_t publish_ssrc = track->ssrc_;