胡斌

fix bug of report error when receive a amf3 data object

@@ -703,7 +703,7 @@ int SrsProtocol::do_decode_message(SrsMessageHeader& header, SrsBuffer* stream, @@ -703,7 +703,7 @@ int SrsProtocol::do_decode_message(SrsMessageHeader& header, SrsBuffer* stream,
703 srs_verbose("start to decode AMF0/AMF3 command message."); 703 srs_verbose("start to decode AMF0/AMF3 command message.");
704 704
705 // skip 1bytes to decode the amf3 command. 705 // skip 1bytes to decode the amf3 command.
706 - if (header.is_amf3_command() && stream->require(1)) { 706 + if ((header.is_amf3_command() || header.is_amf3_data()) && stream->require(1)) {
707 srs_verbose("skip 1bytes to decode AMF3 command"); 707 srs_verbose("skip 1bytes to decode AMF3 command");
708 stream->skip(1); 708 stream->skip(1);
709 } 709 }
@@ -712,7 +712,7 @@ int SrsProtocol::do_decode_message(SrsMessageHeader& header, SrsBuffer* stream, @@ -712,7 +712,7 @@ int SrsProtocol::do_decode_message(SrsMessageHeader& header, SrsBuffer* stream,
712 // need to read the command name. 712 // need to read the command name.
713 std::string command; 713 std::string command;
714 if ((ret = srs_amf0_read_string(stream, command)) != ERROR_SUCCESS) { 714 if ((ret = srs_amf0_read_string(stream, command)) != ERROR_SUCCESS) {
715 - srs_error("decode AMF0/AMF3 command name failed. ret=%d", ret); 715 + srs_error("decode AMF0/AMF3 command name failed. message type:%d ret=%d", header.message_type,ret);
716 return ret; 716 return ret;
717 } 717 }
718 srs_verbose("AMF0/AMF3 command message, command_name=%s", command.c_str()); 718 srs_verbose("AMF0/AMF3 command message, command_name=%s", command.c_str());