winlin

for bug #186, read the args when discovery it. 1.0.4

@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 // current release version 31 // current release version
32 #define VERSION_MAJOR "1" 32 #define VERSION_MAJOR "1"
33 #define VERSION_MINOR "0" 33 #define VERSION_MINOR "0"
34 -#define VERSION_REVISION "3" 34 +#define VERSION_REVISION "4"
35 #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION 35 #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
36 // server info. 36 // server info.
37 #define RTMP_SIG_SRS_KEY "SRS" 37 #define RTMP_SIG_SRS_KEY "SRS"
@@ -1869,11 +1869,17 @@ int SrsConnectAppPacket::decode(SrsStream* stream) @@ -1869,11 +1869,17 @@ int SrsConnectAppPacket::decode(SrsStream* stream)
1869 // the args maybe any amf0, for instance, a string. we should drop if not object. 1869 // the args maybe any amf0, for instance, a string. we should drop if not object.
1870 SrsAmf0Any* any = NULL; 1870 SrsAmf0Any* any = NULL;
1871 if ((ret = SrsAmf0Any::discovery(stream, &any)) != ERROR_SUCCESS) { 1871 if ((ret = SrsAmf0Any::discovery(stream, &any)) != ERROR_SUCCESS) {
1872 - srs_error("amf0 decode connect args failed. ret=%d", ret); 1872 + srs_error("amf0 find connect args failed. ret=%d", ret);
1873 return ret; 1873 return ret;
1874 } 1874 }
1875 srs_assert(any); 1875 srs_assert(any);
1876 1876
  1877 + // read the instance
  1878 + if ((ret = any->read(stream)) != ERROR_SUCCESS) {
  1879 + srs_error("amf0 decode connect args failed. ret=%d", ret);
  1880 + return ret;
  1881 + }
  1882 +
1877 // drop when not an AMF0 object. 1883 // drop when not an AMF0 object.
1878 if (!any->is_object()) { 1884 if (!any->is_object()) {
1879 srs_warn("drop the args, see: '4.1.1. connect', marker=%#x", any->marker); 1885 srs_warn("drop the args, see: '4.1.1. connect', marker=%#x", any->marker);