Starting on padding for RTX stream is accepted. (#3390)

This commit is contained in:
Raja Subramanian
2025-02-02 20:26:30 +05:30
committed by GitHub
parent 20b400faef
commit 92e3f2e3d0
3 changed files with 4 additions and 2 deletions
+1
View File
@@ -384,6 +384,7 @@ func NewDownTrack(params DowntrackParams) (*DownTrack, error) {
d.rtpStatsRTX = rtpstats.NewRTPStatsSender(rtpstats.RTPStatsParams{
ClockRate: d.codec.ClockRate,
IsRTX: true,
Logger: d.params.Logger.WithValues(
"stream", "rtx",
),
+1
View File
@@ -96,6 +96,7 @@ func (s *snapshotLite) MarshalLogObject(e zapcore.ObjectEncoder) error {
type RTPStatsParams struct {
ClockRate uint32
IsRTX bool
Logger logger.Logger
}
+2 -2
View File
@@ -327,7 +327,7 @@ func (r *RTPStatsSender) Update(
}
if !r.initialized {
if payloadSize == 0 {
if payloadSize == 0 && !r.params.IsRTX {
// do not start on a padding only packet
return
}
@@ -383,7 +383,7 @@ func (r *RTPStatsSender) Update(
)
}
if gapSN <= 0 { // duplicate OR out-of-order
if payloadSize == 0 && extSequenceNumber < r.extStartSN {
if payloadSize == 0 && extSequenceNumber < r.extStartSN && !r.params.IsRTX {
// do not start on a padding only packet
return
}