mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
修复getMediaPlayerList获取http-flv播放器列表时崩溃的问题
This commit is contained in:
parent
00c9749b5d
commit
4f47b7a5fe
@ -11,6 +11,7 @@
|
||||
#include "FlvMuxer.h"
|
||||
#include "Util/File.h"
|
||||
#include "Rtmp/utils.h"
|
||||
#include "Http/HttpSession.h"
|
||||
|
||||
#define FILE_BUF_SIZE (64 * 1024)
|
||||
|
||||
@ -45,7 +46,7 @@ void FlvMuxer::start(const EventPoller::Ptr &poller, const RtmpMediaSource::Ptr
|
||||
std::weak_ptr<FlvMuxer> weak_self = getSharedPtr();
|
||||
media->pause(false);
|
||||
_ring_reader = media->getRing()->attach(poller);
|
||||
_ring_reader->setGetInfoCB([weak_self]() { return weak_self.lock(); });
|
||||
_ring_reader->setGetInfoCB([weak_self]() { return dynamic_pointer_cast<HttpSession>(weak_self.lock()); });
|
||||
_ring_reader->setDetachCB([weak_self]() {
|
||||
auto strong_self = weak_self.lock();
|
||||
if (!strong_self) {
|
||||
|
Loading…
Reference in New Issue
Block a user