mirror of
https://github.com/aler9/gortsplib
synced 2025-10-06 23:52:46 +08:00
restore compatibility with go 1.17
This commit is contained in:
@@ -1,37 +1,15 @@
|
||||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
package rtpsimpleaudio
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/pion/rtp"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
var cases = []struct {
|
||||
name string
|
||||
frame []byte
|
||||
pts time.Duration
|
||||
pkt *rtp.Packet
|
||||
}{
|
||||
{
|
||||
"single",
|
||||
[]byte{0x01, 0x02, 0x03, 0x04},
|
||||
25 * time.Millisecond,
|
||||
&rtp.Packet{
|
||||
Header: rtp.Header{
|
||||
Version: 2,
|
||||
Marker: false,
|
||||
PayloadType: 0,
|
||||
SequenceNumber: 17645,
|
||||
Timestamp: 2289526557,
|
||||
SSRC: 0x9dbb7812,
|
||||
},
|
||||
Payload: []byte{0x01, 0x02, 0x03, 0x04},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
func TestDecode(t *testing.T) {
|
||||
for _, ca := range cases {
|
||||
t.Run(ca.name, func(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user