zhangpeihao / gortmp

Implement RTMP protocol by golang
MIT License
523 stars 162 forks source link

rtmp publish panic #31

Closed JulianZhao closed 7 years ago

JulianZhao commented 7 years ago

$ ./rtmp_publisher -FLV test.flv -Stream test -URL "rtmp://ossrs.net:1935/live"

to dial panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x2068]

goroutine 1 [running]: panic(0x1c19a0, 0xc4200140c0) /usr/local/Cellar/go/1.7/libexec/src/runtime/panic.go:500 +0x1a1 main.(*TestOutboundConnHandler).OnStatus(0x2f7050, 0x2c4b40, 0xc420098280) /Users/xxx/go/src/github.com/zhangpeihao/gortmp/demo/publisher/rtmp_publisher.go:38 +0x28 github.com/zhangpeihao/gortmp.Dial(0x7fff5fbffa69, 0x1a, 0x2c3ee0, 0x2f7050, 0x64, 0x0, 0x0, 0x3c, 0x15180) /Users/xxx/go/src/github.com/zhangpeihao/gortmp/outboundconn.go:109 +0x604 main.main() /Users/xxx/go/src/github.com/zhangpeihao/gortmp/demo/publisher/rtmp_publisher.go:138 +0x226

zhangpeihao commented 7 years ago

Fixed

hy05190134 commented 7 years ago

you should get rid of debug code after fixing the bug