Skip to content

Commit 51cca81

Browse files
[FIX]fix duplicate intAgora
1 parent cfe4b1a commit 51cca81

3 files changed

Lines changed: 1 addition & 12 deletions

File tree

windows/APIExample/APIExample/Advanced/Multipath/CMultipathDlg.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ BOOL CMultipathDlg::OnInitDialog()
116116
m_chkEnableMultipath.SetCheck(BST_UNCHECKED);
117117

118118
InitCtrlText();
119-
InitAgora();
120119

121120
return TRUE;
122121
}
@@ -353,7 +352,6 @@ void CMultipathDlg::OnShowWindow(BOOL bShow, UINT nStatus)
353352
CDialogEx::OnShowWindow(bShow, nStatus);
354353
if (bShow) // bShow is true, show window
355354
{
356-
InitAgora();
357355
RenderLocalVideo();
358356
}
359357
else {

windows/APIExample/APIExample/Advanced/Simulcast/CSimulcastDlg.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ void CSimulcastRtcEngineEventHandler::onLeaveChannel(const RtcStats &stats)
3636
void CSimulcastRtcEngineEventHandler::onRemoteVideoStats(const RemoteVideoStats &stats)
3737
{
3838
if (m_hMsgHanlder) {
39-
RemoteVideoStats* s = new RemoteVideoStats;
40-
*s = stats;
41-
::PostMessage(m_hMsgHanlder, WM_MSGID(EID_REMOTE_VIDEO_STATS), (WPARAM)s, 0);
39+
::PostMessage(m_hMsgHanlder, WM_MSGID(EID_REMOTE_VIDEO_STATS), (WPARAM)&stats, 0);
4240
}
4341
}
4442

@@ -237,7 +235,6 @@ void CSimulcastDlg::UnInitAgora()
237235

238236
void CSimulcastDlg::ResumeStatus()
239237
{
240-
InitAgora();
241238
m_lstInfo.ResetContent();
242239
m_cmbRole.SetCurSel(0);
243240
m_joinChannel = false;
@@ -493,7 +490,6 @@ void CSimulcastDlg::OnShowWindow(BOOL bShow, UINT nStatus)
493490
CDialogEx::OnShowWindow(bShow, nStatus);
494491
if (bShow)//bShwo is true ,show window
495492
{
496-
InitAgora();
497493
RenderLocalVideo();
498494
}
499495
else {

windows/APIExample/APIExample/stdafx.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,8 @@
5252
#include "CConfig.h"
5353
#include "Language.h"
5454
#include <afxcontrolbars.h>
55-
#include <afxcontrolbars.h>
56-
#include <afxcontrolbars.h>
57-
#include <afxcontrolbars.h>
58-
#include <afxcontrolbars.h>
5955
#include <chrono>
6056
#include <random>
61-
#include <afxcontrolbars.h>
6257
#pragma comment(lib, "agora_rtc_sdk.dll.lib")
6358
#pragma comment(lib, "libagora_segmentation_extension.dll.lib")
6459
//#pragma comment(lib, "libagora_video_process.dll.lib")

0 commit comments

Comments
 (0)