1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-13 11:51:57 +00:00

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

This commit is contained in:
winlin 2014-10-24 13:16:08 +08:00
parent f4b779060b
commit 7d70864b33
2 changed files with 8 additions and 2 deletions

View file

@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version // current release version
#define VERSION_MAJOR "2" #define VERSION_MAJOR "2"
#define VERSION_MINOR "0" #define VERSION_MINOR "0"
#define VERSION_REVISION "5" #define VERSION_REVISION "6"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info. // server info.
#define RTMP_SIG_SRS_KEY "SRS" #define RTMP_SIG_SRS_KEY "SRS"

View file

@ -1869,11 +1869,17 @@ int SrsConnectAppPacket::decode(SrsStream* stream)
// the args maybe any amf0, for instance, a string. we should drop if not object. // the args maybe any amf0, for instance, a string. we should drop if not object.
SrsAmf0Any* any = NULL; SrsAmf0Any* any = NULL;
if ((ret = SrsAmf0Any::discovery(stream, &any)) != ERROR_SUCCESS) { if ((ret = SrsAmf0Any::discovery(stream, &any)) != ERROR_SUCCESS) {
srs_error("amf0 decode connect args failed. ret=%d", ret); srs_error("amf0 find connect args failed. ret=%d", ret);
return ret; return ret;
} }
srs_assert(any); srs_assert(any);
// read the instance
if ((ret = any->read(stream)) != ERROR_SUCCESS) {
srs_error("amf0 decode connect args failed. ret=%d", ret);
return ret;
}
// drop when not an AMF0 object. // drop when not an AMF0 object.
if (!any->is_object()) { if (!any->is_object()) {
srs_warn("drop the args, see: '4.1.1. connect', marker=%#x", any->marker); srs_warn("drop the args, see: '4.1.1. connect', marker=%#x", any->marker);