mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
This commit is contained in:
parent
77d14ff752
commit
aa98ca60b9
3 changed files with 16 additions and 3 deletions
|
@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
// current release version
|
||||
#define VERSION_MAJOR "1"
|
||||
#define VERSION_MINOR "0"
|
||||
#define VERSION_REVISION "2"
|
||||
#define VERSION_REVISION "3"
|
||||
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
|
||||
// server info.
|
||||
#define RTMP_SIG_SRS_KEY "SRS"
|
||||
|
|
|
@ -1864,11 +1864,23 @@ int SrsConnectAppPacket::decode(SrsStream* stream)
|
|||
|
||||
if (!stream->empty()) {
|
||||
srs_freep(args);
|
||||
args = SrsAmf0Any::object();
|
||||
if ((ret = args->read(stream)) != ERROR_SUCCESS) {
|
||||
|
||||
// see: https://github.com/winlinvip/simple-rtmp-server/issues/186
|
||||
// the args maybe any amf0, for instance, a string. we should drop if not object.
|
||||
SrsAmf0Any* any = NULL;
|
||||
if ((ret = SrsAmf0Any::discovery(stream, &any)) != ERROR_SUCCESS) {
|
||||
srs_error("amf0 decode connect args failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
srs_assert(any);
|
||||
|
||||
// drop when not an AMF0 object.
|
||||
if (!any->is_object()) {
|
||||
srs_warn("drop the args, see: '4.1.1. connect', marker=%#x", any->marker);
|
||||
srs_freep(any);
|
||||
} else {
|
||||
args = any->to_object();
|
||||
}
|
||||
}
|
||||
|
||||
srs_info("amf0 decode connect packet success");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue