Skip to content
This repository was archived by the owner on Feb 4, 2019. It is now read-only.

panic: runtime error: index out of range #1

@moneyzmey

Description

@moneyzmey

Hi, use your example.

start stream using OBS.
got output:

2018/02/02 14:42:29 Serving RTMP on :1935
2018/02/02 14:42:38 Begin RTMP Handshake.
2018/02/02 14:42:38 Receive a C0 chunk.
2018/02/02 14:42:38 Send a S0 chunk.
2018/02/02 14:42:38 Receive a C1 chunk.
2018/02/02 14:42:38 Send a S1 chunk.
2018/02/02 14:42:38 Send a S2 chunk.
2018/02/02 14:42:38 Receive a C2 chunk.
2018/02/02 14:42:38 Set Chunk Size: 4096
2018/02/02 14:42:38 Catch AMF0 Command Message
2018/02/02 14:42:38 Receive connect command message (transactionID: 1.000000).
2018/02/02 14:42:38 Catch AMF0 Command Message
2018/02/02 14:42:38 Receive a releaseStream command (transactionID: 2.000000).
2018/02/02 14:42:38 Catch AMF0 Command Message
2018/02/02 14:42:38 Receive FCPublish command message (transactionID: 3.000000, streamName: 3818f59c-d7ad-40cf-ae16-a369589da90c).
2018/02/02 14:42:38 Catch AMF0 Command Message
2018/02/02 14:42:38 Catch createStream command message - (transactionID: 4.000000)
2018/02/02 14:42:38 Catch AMF0 Command Message
2018/02/02 14:42:38 Catch publish command message - (transactionID: 5.000000)
2018/02/02 14:42:38 Catch DataMessage(AMF0)
2018/02/02 14:42:39 Catch audio message
2018/02/02 14:42:39 Catch video message
2018/02/02 14:42:39 Catch video message
2018/02/02 14:42:39 Catch video message
2018/02/02 14:42:39 Catch video message
2018/02/02 14:42:39 Catch audio message
2018/02/02 14:42:39 Catch audio message
2018/02/02 14:42:39 Catch video message
2018/02/02 14:42:39 Catch audio message
2018/02/02 14:42:39 Catch video message
2018/02/02 14:42:39 Catch audio message
2018/02/02 14:42:39 Catch audio message
2018/02/02 14:42:39 Catch video message
2018/02/02 14:42:39 Catch audio message
2018/02/02 14:42:39 Catch video message
2018/02/02 14:42:39 Catch audio message
2018/02/02 14:42:39 Catch audio message
2018/02/02 14:42:39 Catch video message
2018/02/02 14:42:39 Catch audio message
2018/02/02 14:42:39 Catch video message
2018/02/02 14:42:39 Catch audio message
panic: runtime error: index out of range

goroutine 19 [running]:
encoding/binary.binary.bigEndian.Uint32(...)
	/usr/local/go/src/encoding/binary/binary.go:111
github.com/c-bata/rtmp.readMessageHeader(0xc4200960c0, 0xc420084c02, 0x0, 0x0, 0x0)
GolangProjects/src/github.com/c-bata/rtmp/chunk.go:246 +0x68e
github.com/c-bata/rtmp.readChunkHeader(0xc4200960c0, 0x1158e24, 0x13, 0x0)
GolangProjects/src/github.com/c-bata/rtmp/chunk.go:51 +0x67
github.com/c-bata/rtmp.(*conn).readChunk(0xc4200a6100, 0x0, 0x0)
GolangProjects/src/github.com/c-bata/rtmp/conn.go:196 +0x47
github.com/c-bata/rtmp.(*conn).serve(0xc4200a6100, 0xc4200c9000, 0x1000)
GolangProjects/src/github.com/c-bata/rtmp/conn.go:81 +0x102
created by github.com/c-bata/rtmp.(*Server).Serve
GolangProjects/src/github.com/c-bata/rtmp/server.go:56 +0x4dd

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions