mirror of
https://github.com/aler9/gortsplib
synced 2025-10-23 15:13:30 +08:00
client: allow calling WriteFrame() when reading
This commit is contained in:
@@ -332,7 +332,7 @@ func TestServerReadFrames(t *testing.T) {
|
||||
onFrame := func(trackID int, typ StreamType, buf []byte) {
|
||||
require.Equal(t, 0, trackID)
|
||||
require.Equal(t, StreamTypeRTCP, typ)
|
||||
require.Equal(t, []byte("\x01\x02\x03\x04"), buf)
|
||||
require.Equal(t, []byte{0x01, 0x02, 0x03, 0x04}, buf)
|
||||
close(framesReceived)
|
||||
}
|
||||
|
||||
@@ -406,7 +406,7 @@ func TestServerReadFrames(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
defer l1.Close()
|
||||
|
||||
l1.WriteTo([]byte("\x01\x02\x03\x04"), &net.UDPAddr{
|
||||
l1.WriteTo([]byte{0x01, 0x02, 0x03, 0x04}, &net.UDPAddr{
|
||||
IP: net.ParseIP("127.0.0.1"),
|
||||
Port: th.ServerPorts[1],
|
||||
})
|
||||
@@ -414,7 +414,7 @@ func TestServerReadFrames(t *testing.T) {
|
||||
err = base.InterleavedFrame{
|
||||
TrackID: 0,
|
||||
StreamType: StreamTypeRTCP,
|
||||
Payload: []byte("\x01\x02\x03\x04"),
|
||||
Payload: []byte{0x01, 0x02, 0x03, 0x04},
|
||||
}.Write(bconn.Writer)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user