mirror of
https://github.com/ossrs/srs.git
synced 2025-02-14 12:21:55 +00:00
fix #418, ignore null connect props to make RED5 happy. 2.0.204
This commit is contained in:
parent
8d378cda2e
commit
8b24319ffb
3 changed files with 21 additions and 4 deletions
|
@ -337,6 +337,7 @@ Remark:
|
|||
|
||||
## History
|
||||
|
||||
* v2.0, 2015-12-22, for [#418][bug #418] ignore null connect props to make RED5 happy. 2.0.204
|
||||
* v2.0, 2015-12-22, for [#546][bug #546] thread terminate normally dispose bug. 2.0.203
|
||||
* v2.0, 2015-12-22, for [#541][bug #541] failed when chunk size too small. 2.0.202
|
||||
* v2.0, 2015-12-15, default hls_on_error to continue. 2.0.201
|
||||
|
@ -1211,6 +1212,7 @@ Winlin
|
|||
[bug #518]: https://github.com/ossrs/srs/issues/518
|
||||
[bug #541]: https://github.com/ossrs/srs/issues/541
|
||||
[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
|
||||
|
||||
[exo #828]: https://github.com/google/ExoPlayer/pull/828
|
||||
|
|
|
@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
// current release version
|
||||
#define VERSION_MAJOR 2
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 203
|
||||
#define VERSION_REVISION 204
|
||||
|
||||
// server info.
|
||||
#define RTMP_SIG_SRS_KEY "SRS"
|
||||
|
|
|
@ -3289,9 +3289,24 @@ int SrsConnectAppResPacket::decode(SrsStream* stream)
|
|||
ret = ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
if ((ret = props->read(stream)) != ERROR_SUCCESS) {
|
||||
srs_error("amf0 decode connect props failed. ret=%d", ret);
|
||||
return ret;
|
||||
// for RED5(1.0.6), the props is NULL, we must ignore it.
|
||||
// @see https://github.com/ossrs/srs/issues/418
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue