This commit is contained in:
wangjiyu 2025-04-11 09:13:06 +08:00
parent 55124f0ddb
commit d9c0012c75
1 changed files with 6 additions and 9 deletions

View File

@ -355,17 +355,14 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId,
throw std::runtime_error("Python callback error"); throw std::runtime_error("Python callback error");
} }
std::cout << " 回调执行成功" << std::endl; std::cout << " 回调执行成功" << std::endl;
}
catch (const py::error_already_set& e) { } catch (...) {
std::cerr << "[PYTHON ERROR] " << e.what() << std::endl; std::cout << "[ERROR] 回调执行失败" << std::endl;
PyErr_Print(); munmap(ptr, data_size);
close(fd);
shm_unlink(shm_name);
throw; throw;
} }
catch (...) {
Py_DECREF(pyCallback_.ptr());
throw;
}
Py_DECREF(pyCallback_.ptr());
} else { } else {
std::cout << "[7] 无回调函数设置" << std::endl; std::cout << "[7] 无回调函数设置" << std::endl;
} }