this->m_pRtmpLive = ECX_RtmpLiveSDK::RtmpLiveAlloc(
(wchar_t*)((const wchar_t*)(cstrRtmpUrl.toStdString().c_str())),
(wchar_t*)((const wchar_t*)(cstrRtmpUrl.toStdString().c_str())),
(wchar_t*)((const wchar_t*)(cstrAudioDevId.toStdString().c_str())),
320, 240,//解析度
250, 25, //碼流、幀率
(void *)ui.axWidget_2->windowHandle(),//是否顯示預覽畫面
rcAxwidget.right()-rcAxwidget.left(), rcAxwidget.bottom()-rcAxwidget.top()
);
其中cstrRtmpUrl、cstrRtmpUrl、cstrAudioDevId均是QString型別,
程式運行到這的時候就出現記憶體錯誤,
“ExpertsClient.exe 中的 0x04c69212 處有未經處理的例外: 0xC0000005: 讀取位置 0xbaadf00d 時發生訪問沖突”
不斷了除錯很長時間了,測驗了很多地方,但是還是有錯誤,實在不知道是什么原因,請大家幫幫忙,看下怎么解決?
函式原型:
ECX_Export ECX_RtmpLive* __stdcall RtmpLiveAlloc(
wchar_t wstrRtmpUrl[M_DEF_ECX_DFT_DEV_NV_BUF_SIZE],
wchar_t wstrVideoDevId[M_DEF_ECX_DFT_DEV_NV_BUF_SIZE],
wchar_t wstrAudioDevId[M_DEF_ECX_DFT_DEV_NV_BUF_SIZE],
int nWidth, int nHeight, int nBits, int nFps,
void* hWndPreview, int nWidthPreview, int nHeightPreview
);
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/111492.html
