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
714c13d88d
2 changed files with 13 additions and 4 deletions
|
@ -1290,6 +1290,7 @@ Winlin
|
||||||
[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 #418]: https://github.com/ossrs/srs/issues/418
|
||||||
|
[bug #509]: https://github.com/ossrs/srs/issues/509
|
||||||
[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
|
||||||
|
|
|
@ -1992,11 +1992,19 @@ int SrsRtmpClient::handshake()
|
||||||
|
|
||||||
srs_assert(hs_bytes);
|
srs_assert(hs_bytes);
|
||||||
|
|
||||||
SrsComplexHandshake complex_hs;
|
// maybe st has problem when alloc object on stack, always alloc object at heap.
|
||||||
if ((ret = complex_hs.handshake_with_server(hs_bytes, io)) != ERROR_SUCCESS) {
|
// @see https://github.com/ossrs/srs/issues/509
|
||||||
|
SrsComplexHandshake* complex_hs = new SrsComplexHandshake();
|
||||||
|
SrsAutoFree(SrsComplexHandshake, complex_hs);
|
||||||
|
|
||||||
|
if ((ret = complex_hs->handshake_with_server(hs_bytes, io)) != ERROR_SUCCESS) {
|
||||||
if (ret == ERROR_RTMP_TRY_SIMPLE_HS) {
|
if (ret == ERROR_RTMP_TRY_SIMPLE_HS) {
|
||||||
SrsSimpleHandshake simple_hs;
|
// always alloc object at heap.
|
||||||
if ((ret = simple_hs.handshake_with_server(hs_bytes, io)) != ERROR_SUCCESS) {
|
// @see https://github.com/ossrs/srs/issues/509
|
||||||
|
SrsSimpleHandshake* simple_hs = new SrsSimpleHandshake();
|
||||||
|
SrsAutoFree(SrsSimpleHandshake, simple_hs);
|
||||||
|
|
||||||
|
if ((ret = simple_hs->handshake_with_server(hs_bytes, io)) != ERROR_SUCCESS) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue