mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 23:26:54 +08:00
25 lines
337 B
Go
25 lines
337 B
Go
package rtptimedec
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestOverflow(t *testing.T) {
|
|
d := New(90000)
|
|
var pts time.Duration
|
|
|
|
for _, ts := range []uint32{
|
|
4294877296,
|
|
90001,
|
|
3240090001,
|
|
565122706,
|
|
} {
|
|
pts = d.Decode(ts)
|
|
}
|
|
|
|
require.Equal(t, 15*60*60*time.Second+2*time.Second, pts)
|
|
}
|