From 4f47b7a5fefca56fe9b130f0141f1d643bc36edb Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Mon, 5 Sep 2022 14:59:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DgetMediaPlayerList=E8=8E=B7?= =?UTF-8?q?=E5=8F=96http-flv=E6=92=AD=E6=94=BE=E5=99=A8=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=97=B6=E5=B4=A9=E6=BA=83=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtmp/FlvMuxer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Rtmp/FlvMuxer.cpp b/src/Rtmp/FlvMuxer.cpp index 8439e670..bd64acf9 100644 --- a/src/Rtmp/FlvMuxer.cpp +++ b/src/Rtmp/FlvMuxer.cpp @@ -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 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(weak_self.lock()); }); _ring_reader->setDetachCB([weak_self]() { auto strong_self = weak_self.lock(); if (!strong_self) {