diff --git a/src/Rtmp/amf.cpp b/src/Rtmp/amf.cpp index a63e491e..89014856 100644 --- a/src/Rtmp/amf.cpp +++ b/src/Rtmp/amf.cpp @@ -76,8 +76,8 @@ inline void AMFValue::init() { } } -AMFValue::AMFValue() : - _type(AMF_NULL) { +AMFValue::AMFValue(AMFType type) : + _type(type) { init(); } diff --git a/src/Rtmp/amf.h b/src/Rtmp/amf.h index 7e5ed0ac..ead844d8 100644 --- a/src/Rtmp/amf.h +++ b/src/Rtmp/amf.h @@ -55,7 +55,7 @@ public: typedef std::map mapType; typedef std::vector arrayType; - AMFValue(); + AMFValue(AMFType type = AMF_NULL); AMFValue(const char *s); AMFValue(const std::string &s); AMFValue(double n);