1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

fix simple handshake bug #46, copy c1 to s2. change to 0.9.63

This commit is contained in:
winlin 2014-04-13 21:55:01 +08:00
parent 9a036958d7
commit bc756d6ad9
4 changed files with 10 additions and 4 deletions

View file

@ -275,7 +275,7 @@ int SrsHandshakeBytes::create_c0c1()
return ret;
}
int SrsHandshakeBytes::create_s0s1s2()
int SrsHandshakeBytes::create_s0s1s2(const char* c1)
{
int ret = ERROR_SUCCESS;
@ -294,6 +294,12 @@ int SrsHandshakeBytes::create_s0s1s2()
*(int32_t*)(s0s1s2 + 1 + 4) = *(int32_t*)(c0c1 + 1);
}
// if c1 specified, copy c1 to s2.
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/46
if (c1) {
memcpy(s0s1s2 + 1537, c1, 1536);
}
return ret;
}