Skip to content

Commit 6643baa

Browse files
committed
[Windows]fix sei crash.
1 parent 6e02134 commit 6643baa

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

windows/APIExample/APIExample/Advanced/VideoMetadata/CAgoraMetaDataDlg.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,9 @@ LRESULT CAgoraMetaDataDlg::OnEIDMetadataReceived(WPARAM wParam, LPARAM lParam)
461461

462462
if (metaData->size > 0) {
463463
CString str;
464-
str.Format(_T("Info: %s"), utf82cs(std::string((char*)metaData->buffer)));
464+
TCHAR szBuf[2 * MAX_PATH] = { 0 };
465+
MultiByteToWideChar(CP_UTF8, MB_USEGLYPHCHARS, std::string((char*)metaData->buffer).c_str(), 2 * MAX_PATH, szBuf, 2 * MAX_PATH);
466+
str.Format(_T("Info: %s"), CString(szBuf));
465467
strInfo += str;
466468
}
467469
m_edtRecvSEI.SetWindowText(strInfo);

0 commit comments

Comments
 (0)