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

change srt epoll thread to one thread (#1597)

* if there isn't srt connect, it needn't epoll wait

* solve repush srt bugs

* change two thread to one thread

* mpegts discard header is not 0x47

* add srt_epoll_clear_usocks
This commit is contained in:
Alex.CR 2020-02-11 20:23:39 -06:00 committed by GitHub
parent 3847807534
commit c2012379af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 57 additions and 163 deletions

View file

@ -296,7 +296,11 @@ int ts_demux::decode(SRT_DATA_MSG_PTR data_ptr, TS_DATA_CALLBACK_PTR callback)
path = data_ptr->get_path();
for (unsigned int index = 0; index < count; index++)
{
ret = decode_unit(data_ptr->get_data() + 188*index, path, callback);
unsigned char* data = data_ptr->get_data() + 188*index;
if (data[0] != 0x47) {
continue;
}
ret = decode_unit(data, path, callback);
if (ret < 0)
{
break;