FIX: media play error url

Change-Id: I7ade71a951fda4e5b2d6c632248d0868846f4e7f
This commit is contained in:
chunmao.guo 2022-09-08 19:05:34 +08:00 committed by Lane.Wei
parent a0d4185909
commit 5f1138f022
1 changed files with 2 additions and 1 deletions

View File

@ -99,8 +99,9 @@ void MediaPlayCtrl::Play()
NetworkAgent* agent = wxGetApp().getAgent(); NetworkAgent* agent = wxGetApp().getAgent();
if (agent) { if (agent) {
agent->get_camera_url(m_machine, [this](std::string url) { agent->get_camera_url(m_machine, [this, m = m_machine](std::string url) {
BOOST_LOG_TRIVIAL(info) << "camera_url: " << url; BOOST_LOG_TRIVIAL(info) << "camera_url: " << url;
if (m != m_machine) return;
CallAfter([this, url] { CallAfter([this, url] {
m_url = url; m_url = url;
if (m_last_state == MEDIASTATE_INITIALIZING) { if (m_last_state == MEDIASTATE_INITIALIZING) {