mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
merge from srs2
This commit is contained in:
commit
65b81a4e68
3 changed files with 24 additions and 3 deletions
|
@ -1289,6 +1289,7 @@ Winlin
|
||||||
[bug #518]: https://github.com/ossrs/srs/issues/518
|
[bug #518]: https://github.com/ossrs/srs/issues/518
|
||||||
[bug #541]: https://github.com/ossrs/srs/issues/541
|
[bug #541]: https://github.com/ossrs/srs/issues/541
|
||||||
[bug #546]: https://github.com/ossrs/srs/issues/546
|
[bug #546]: https://github.com/ossrs/srs/issues/546
|
||||||
|
[bug #418]: https://github.com/ossrs/srs/issues/418
|
||||||
[bug #xxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxx
|
[bug #xxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxx
|
||||||
|
|
||||||
[exo #828]: https://github.com/google/ExoPlayer/pull/828
|
[exo #828]: https://github.com/google/ExoPlayer/pull/828
|
||||||
|
|
|
@ -1164,6 +1164,11 @@ int SrsSimpleHandshake::handshake_with_server(SrsHandshakeBytes* hs_bytes, ISrsP
|
||||||
if ((ret = hs_bytes->create_c2()) != ERROR_SUCCESS) {
|
if ((ret = hs_bytes->create_c2()) != ERROR_SUCCESS) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// for simple handshake, copy s1 to c2.
|
||||||
|
// @see https://github.com/ossrs/srs/issues/418
|
||||||
|
memcpy(hs_bytes->c2, hs_bytes->s0s1s2 + 1, 1536);
|
||||||
|
|
||||||
if ((ret = io->write(hs_bytes->c2, 1536, &nsize)) != ERROR_SUCCESS) {
|
if ((ret = io->write(hs_bytes->c2, 1536, &nsize)) != ERROR_SUCCESS) {
|
||||||
srs_warn("simple handshake write c2 failed. ret=%d", ret);
|
srs_warn("simple handshake write c2 failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -3300,9 +3300,24 @@ int SrsConnectAppResPacket::decode(SrsBuffer* stream)
|
||||||
ret = ERROR_SUCCESS;
|
ret = ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ret = props->read(stream)) != ERROR_SUCCESS) {
|
// for RED5(1.0.6), the props is NULL, we must ignore it.
|
||||||
srs_error("amf0 decode connect props failed. ret=%d", ret);
|
// @see https://github.com/ossrs/srs/issues/418
|
||||||
return ret;
|
if (!stream->empty()) {
|
||||||
|
SrsAmf0Any* p = NULL;
|
||||||
|
if ((ret = srs_amf0_read_any(stream, &p)) != ERROR_SUCCESS) {
|
||||||
|
srs_error("amf0 decode connect props failed. ret=%d", ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore when props is not amf0 object.
|
||||||
|
if (!p->is_object()) {
|
||||||
|
srs_warn("ignore connect response props marker=%#x.", (u_int8_t)p->marker);
|
||||||
|
srs_freep(p);
|
||||||
|
} else {
|
||||||
|
srs_freep(props);
|
||||||
|
props = p->to_object();
|
||||||
|
srs_info("accept amf0 object connect response props");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ret = info->read(stream)) != ERROR_SUCCESS) {
|
if ((ret = info->read(stream)) != ERROR_SUCCESS) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue