diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index 1175e8ce..a6897eef 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -186,8 +186,10 @@ func connect(c *Conn) error { return err } c.log(DebugLevel, pkg+"negotiating") + + var buf [256]byte for !c.isPlaying { - pkt := packet{} + pkt := packet{buf: buf[:]} err = pkt.readFrom(c) if err != nil { break