@@ -218,10 +218,15 @@ func (r *RTPReceiver) startReceive(parameters RTPReceiveParameters) error { //no
218218 return fmt .Errorf ("%w: %d" , errRTPReceiverWithSSRCTrackStreamNotFound , parameters .Encodings [i ].SSRC )
219219 }
220220
221+ rtxPayloadType := findRTXPayloadType (globalParams .Codecs [0 ].PayloadType , globalParams .Codecs )
221222 streams .streamInfo = createStreamInfo (
222223 "" ,
223224 parameters .Encodings [i ].SSRC ,
224- 0 , 0 , 0 , 0 , 0 ,
225+ parameters .Encodings [i ].RTX .SSRC ,
226+ parameters .Encodings [i ].FEC .SSRC ,
227+ globalParams .Codecs [0 ].PayloadType ,
228+ rtxPayloadType ,
229+ findFECPayloadType (globalParams .Codecs ),
225230 codec ,
226231 globalParams .HeaderExtensions ,
227232 )
@@ -233,7 +238,18 @@ func (r *RTPReceiver) startReceive(parameters RTPReceiveParameters) error { //no
233238 }
234239
235240 if rtxSsrc := parameters .Encodings [i ].RTX .SSRC ; rtxSsrc != 0 {
236- streamInfo := createStreamInfo ("" , rtxSsrc , 0 , 0 , 0 , 0 , 0 , codec , globalParams .HeaderExtensions )
241+ // streamInfo := createStreamInfo("", rtxSsrc, 0, 0, 0, 0, 0, codec, globalParams.HeaderExtensions)
242+ streamInfo := createStreamInfo (
243+ "" ,
244+ rtxSsrc ,
245+ 0 ,
246+ 0 ,
247+ rtxPayloadType ,
248+ 0 ,
249+ 0 ,
250+ codec ,
251+ globalParams .HeaderExtensions ,
252+ )
237253 rtpReadStream , rtpInterceptor , rtcpReadStream , rtcpInterceptor , err := r .transport .streamsForSSRC (
238254 rtxSsrc ,
239255 * streamInfo ,
0 commit comments