修复DTS生成时遇到PTS超过循环的情况

This commit is contained in:
dexter
2023-01-30 22:17:34 +08:00
parent db6f8de3a7
commit b306f65a7a
10 changed files with 52 additions and 34 deletions

View File

@@ -0,0 +1,17 @@
package common
import (
"testing"
)
func TestDts(t *testing.T) {
t.Run(t.Name(), func(t *testing.T) {
dtsg := NewDTSEstimator()
var pts uint32 = 0xFFFFFFFF - 5
for i := 0; i < 10; i++ {
dts := dtsg.Feed(pts)
pts++
t.Logf("dts=%d", dts)
}
})
}