diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index f4790488..5c67b2b2 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -129,10 +129,10 @@ var ( ) var ( - errUnknownScheme = errors.New("Unknown scheme") - errHandshake = errors.New("Handshake failed") - errConnSend = errors.New("Connection send error") - errConnStream = errors.New("Connection stream error") + errUnknownScheme = errors.New("rtmp: unknown scheme") + errHandshake = errors.New("rtmp: handshake failed") + errConnSend = errors.New("rtmp: connection send error") + errConnStream = errors.New("rtmp: connection stream error") ) func startSession(rtmp *C_RTMP, u string, timeout uint) (*C_RTMP, error) { @@ -252,7 +252,7 @@ func C_RTMP_SetBufferMS(r *C_RTMP, size int32) { func C_RTMP_SetupURL(r *C_RTMP, addr string) (err error) { r.Link.protocol, r.Link.host, r.Link.port, r.Link.app, r.Link.playpath0, err = C_RTMP_ParseURL(addr) if err != nil { - return nil + return err } r.Link.playpath = r.Link.playpath0