diff --git a/rtmp/amf/amf.go b/rtmp/amf/amf.go index c6806ad9..55a656fc 100644 --- a/rtmp/amf/amf.go +++ b/rtmp/amf/amf.go @@ -44,28 +44,28 @@ import ( "math" ) -// AMF data types. +// AMF data types, as defined by the AMF specification. // NB: we export these sparingly. const ( - typeNumber = iota - typeBoolean - typeString - TypeObject - typeMovieClip - TypeNull - typeUndefined - typeReference - typeEcmaArray - TypeObjectEnd - typeStrictArray - typeDate - typeLongString - typeUnsupported - typeRecordset - typeXmlDoc - typeTypedObject - typeAvmplus - typeInvalid = 0xff + typeNumber = 0x00 + typeBoolean = 0x01 + typeString = 0x02 + TypeObject = 0x03 + typeMovieClip = 0x04 + TypeNull = 0x05 + typeUndefined = 0x06 + typeReference = 0x07 + typeEcmaArray = 0x08 + TypeObjectEnd = 0x09 + typeStrictArray = 0x0A + typeDate = 0x0B + typeLongString = 0x0C + typeUnsupported = 0x0D + typeRecordset = 0x0E + typeXmlDoc = 0x0F + typeTypedObject = 0x10 + typeAvmplus = 0x11 + typeInvalid = 0xff ) // AMF represents an AMF message (object), which is simply a collection of properties. @@ -479,7 +479,7 @@ func Decode(obj *Object, buf []byte, decodeName bool) (int, error) { // GetProp returns an object's property, either by its index when idx is non-negative, or by its name otherwise. // If the requested property is not found an ErrPropertyNotFound error is returned. -func (obj *Object)GetProp(name string, idx int) (*Property, error) { +func (obj *Object) GetProp(name string, idx int) (*Property, error) { if idx >= 0 { if idx < len(obj.Props) { return &obj.Props[idx], nil