mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-20 02:00:05 -08:00
rtmp: fix connect command when reading (#4512)
when reading, the "connect" command should not contain fpad, capabilities, audioCodecs, videoCodecs, videoFunction.
This commit is contained in:
parent
fd0f08e94a
commit
a85d8f1391
14 changed files with 313 additions and 143 deletions
|
|
@ -48,10 +48,18 @@ func TestSource(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
defer nconn.Close()
|
||||
|
||||
conn, _, _, err := rtmp.NewServerConn(nconn)
|
||||
conn := &rtmp.Conn{
|
||||
RW: nconn,
|
||||
}
|
||||
err = conn.Initialize()
|
||||
require.NoError(t, err)
|
||||
|
||||
w, err := rtmp.NewWriter(conn, test.FormatH264, test.FormatMPEG4Audio)
|
||||
w := &rtmp.Writer{
|
||||
Conn: conn,
|
||||
VideoTrack: test.FormatH264,
|
||||
AudioTrack: test.FormatMPEG4Audio,
|
||||
}
|
||||
err = w.Initialize()
|
||||
require.NoError(t, err)
|
||||
|
||||
err = w.WriteH264(2*time.Second, 2*time.Second, [][]byte{{5, 2, 3, 4}})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue