修复python on_create_muxer事件隐式拷贝对象的bug

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));
}