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:
Alessandro Ros 2025-05-10 15:26:48 +02:00 committed by GitHub
parent fd0f08e94a
commit a85d8f1391
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 313 additions and 143 deletions

View file

@ -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}})