mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 12:37:09 +08:00
fix rtmp bug
This commit is contained in:
parent
949a525bf0
commit
24e695824f
@ -626,23 +626,12 @@ const char* RtmpProtocol::handle_rtmp(const char *data, size_t len) {
|
||||
case 12:
|
||||
chunk_data.is_abs_stamp = true;
|
||||
chunk_data.stream_index = load_le32(header->stream_index);
|
||||
_last_stream_index = chunk_data.stream_index;
|
||||
case 8:
|
||||
chunk_data.body_size = load_be24(header->body_size);
|
||||
chunk_data.type_id = header->type_id;
|
||||
_last_body_size = chunk_data.body_size;
|
||||
_last_type_id = chunk_data.type_id;
|
||||
case 4:
|
||||
chunk_data.ts_field = load_be24(header->time_stamp);
|
||||
}
|
||||
switch (header->fmt) {
|
||||
case 2:
|
||||
chunk_data.type_id = _last_type_id;
|
||||
chunk_data.body_size = _last_body_size;
|
||||
case 1:
|
||||
chunk_data.stream_index = _last_stream_index;
|
||||
}
|
||||
|
||||
auto time_stamp = chunk_data.ts_field;
|
||||
if (chunk_data.ts_field == 0xFFFFFF) {
|
||||
if (len < header_len + offset + 4) {
|
||||
|
@ -88,9 +88,6 @@ protected:
|
||||
private:
|
||||
bool _data_started = false;
|
||||
int _now_chunk_id = 0;
|
||||
uint32_t _last_stream_index = 0;
|
||||
size_t _last_body_size = 0;
|
||||
uint8_t _last_type_id = 0;
|
||||
////////////ChunkSize////////////
|
||||
size_t _chunk_size_in = DEFAULT_CHUNK_LEN;
|
||||
size_t _chunk_size_out = DEFAULT_CHUNK_LEN;
|
||||
|
Loading…
Reference in New Issue
Block a user