修复python on_create_muxer事件隐式拷贝对象的bug
Some checks failed
Android / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Docker / build (push) Has been cancelled
Linux / build (push) Has been cancelled
Linux_Python / build (push) Has been cancelled
macOS / build (push) Has been cancelled
macOS_Python / build (push) Has been cancelled
Windows / build (push) Has been cancelled
Windows_Python / build (push) Has been cancelled

This commit is contained in:
xia-chu 2026-03-07 13:04:12 +08:00
parent d8880f032d
commit b8301bd085
2 changed files with 2 additions and 2 deletions

View File

@ -515,7 +515,7 @@ PythonInvoker::PythonInvoker() {
NoticeCenter::Instance().addListener(this, Broadcast::kBroadcastCreateMuxer, [this](BroadcastCreateMuxerArgs) {
py::gil_scoped_acquire guard;
if (_on_create_muxer) {
auto py_muxer = _on_create_muxer(sender);
auto py_muxer = _on_create_muxer(to_python_ref(sender));
if (py_muxer && !py_muxer.is_none()) {
delegate = std::make_shared<MuxerDelegatePython>(std::move(py_muxer));
}

View File

@ -25,7 +25,7 @@
namespace mediakit {
class MultiMediaSourceMuxer : public MediaSourceEventInterceptor, public MediaSink, public std::enable_shared_from_this<MultiMediaSourceMuxer>{
class MultiMediaSourceMuxer : public MediaSourceEventInterceptor, public MediaSink, public toolkit::noncopyable, public std::enable_shared_from_this<MultiMediaSourceMuxer>{
public:
using Ptr = std::shared_ptr<MultiMediaSourceMuxer>;
using RingType = toolkit::RingBuffer<Frame::Ptr>;