mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
63867bc8c2
@ -1 +1 @@
|
||||
Subproject commit 42139e18ce46869760cc29f77ad6ce5de1f5dcee
|
||||
Subproject commit 7ae5f547c17ddc7bee7b82ebc114248df99de620
|
@ -26,7 +26,14 @@ MediaPlayer::~MediaPlayer() {
|
||||
static void setOnCreateSocket_l(const std::shared_ptr<PlayerBase> &delegate, const Socket::onCreateSocket &cb){
|
||||
auto helper = dynamic_pointer_cast<SocketHelper>(delegate);
|
||||
if (helper) {
|
||||
helper->setOnCreateSocket(cb);
|
||||
if (cb) {
|
||||
helper->setOnCreateSocket(cb);
|
||||
} else {
|
||||
//客户端,确保开启互斥锁
|
||||
helper->setOnCreateSocket([](const EventPoller::Ptr &poller) {
|
||||
return Socket::createSocket(poller, true);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -602,7 +602,9 @@ const char* RtmpProtocol::handle_rtmp(const char *data, uint64_t len) {
|
||||
//need more data
|
||||
return ptr;
|
||||
}
|
||||
chunk_data.buffer.append(ptr + header_len + offset, more);
|
||||
if (more) {
|
||||
chunk_data.buffer.append(ptr + header_len + offset, more);
|
||||
}
|
||||
ptr += header_len + offset + more;
|
||||
len -= header_len + offset + more;
|
||||
if (chunk_data.buffer.size() == chunk_data.body_size) {
|
||||
|
Loading…
Reference in New Issue
Block a user