This commit is contained in:
wangjiyu 2025-04-15 15:59:11 +08:00
parent d10c751a06
commit 7086e4cd21
1 changed files with 4 additions and 0 deletions

View File

@ -67,6 +67,10 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId,
// 1. 获取GIL
std::cout << "[1] 获取GIL锁..." << std::endl;
if (!Py_IsInitialized()) {
std::cerr << "Python 解释器未初始化!" << std::endl;
return;
}
PyGILState_STATE gstate = PyGILState_Ensure();
try {