Changed RTMP set peer bandwidth size from 4 to 5 bytes.
This commit is contained in:
parent
185d75e0d9
commit
49f9b44add
1 changed files with 12 additions and 5 deletions
|
@ -244,13 +244,20 @@ std::string & RTMPStream::SendCTL(unsigned char type, unsigned int data) {
|
||||||
static RTMPStream::Chunk ch;
|
static RTMPStream::Chunk ch;
|
||||||
ch.cs_id = 2;
|
ch.cs_id = 2;
|
||||||
ch.timestamp = Util::getMS();
|
ch.timestamp = Util::getMS();
|
||||||
ch.len = 4;
|
|
||||||
ch.real_len = 4;
|
|
||||||
ch.len_left = 0;
|
|
||||||
ch.msg_type_id = type;
|
ch.msg_type_id = type;
|
||||||
ch.msg_stream_id = 0;
|
ch.msg_stream_id = 0;
|
||||||
ch.data.resize(4);
|
ch.len_left = 0;
|
||||||
*(int *)((char *)ch.data.c_str()) = htonl(data);
|
if (type == 6){
|
||||||
|
ch.len = 5;
|
||||||
|
ch.real_len = 5;
|
||||||
|
ch.data.resize(5);
|
||||||
|
((char*)ch.data.data())[4] = 0;
|
||||||
|
}else{
|
||||||
|
ch.len = 4;
|
||||||
|
ch.real_len = 4;
|
||||||
|
ch.data.resize(4);
|
||||||
|
}
|
||||||
|
*(int *)((char *)ch.data.data()) = htonl(data);
|
||||||
return ch.Pack();
|
return ch.Pack();
|
||||||
} //SendCTL
|
} //SendCTL
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue