]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/mediactrl.cpp
WinCE compile fix
[wxWidgets.git] / src / msw / mediactrl.cpp
index 7c2e511cfda33759d21360278f9c258c29b0d758..7384442f50a9f68763d9a810ca6201d42088f575 100644 (file)
@@ -1612,7 +1612,10 @@ wxAMMediaBackend::~wxAMMediaBackend()
 
     if(m_pAX)
     {
 
     if(m_pAX)
     {
-        m_pAX->DissociateHandle();
+        {
+            wxLogNull noLog;
+            m_pAX->DissociateHandle();
+        }
         delete m_pAX;
         m_pAM->Release();
 
         delete m_pAX;
         m_pAM->Release();
 
@@ -1629,7 +1632,10 @@ wxAMMediaBackend::~wxAMMediaBackend()
 void wxAMMediaBackend::Clear()
 {
     if(m_pTimer)
 void wxAMMediaBackend::Clear()
 {
     if(m_pTimer)
+    {
         delete m_pTimer;
         delete m_pTimer;
+        m_pTimer = NULL;
+    }
 }
 
 //---------------------------------------------------------------------------
 }
 
 //---------------------------------------------------------------------------
@@ -1870,33 +1876,7 @@ bool wxAMMediaBackend::ShowPlayerControls(wxMediaCtrlPlayerControls flags)
 //---------------------------------------------------------------------------
 bool wxAMMediaBackend::Play()
 {
 //---------------------------------------------------------------------------
 bool wxAMMediaBackend::Play()
 {
-    // if the movie isn't done loading yet
-    // go into an sync getmessage loop until it is :)
-    if(m_pMP)
-    {
-        MPReadyStateConstants nState;
-        m_pMP->get_ReadyState(&nState);
-        while(nState == mpReadyStateLoading && wxYieldIfNeeded())
-        {
-          m_pMP->get_ReadyState(&nState);
-        }
-    }
-    else
-    {
-        IActiveMovie2* pAM2;
-        ReadyStateConstants nState;
-        if(m_pAM->QueryInterface(IID_IActiveMovie2, (void**)&pAM2) == 0 &&
-            pAM2->get_ReadyState(&nState) == 0)
-        {
-            while(nState == amvLoading && wxYieldIfNeeded())
-            {
-                pAM2->get_ReadyState(&nState);
-            }
-            pAM2->Release();
-        }
-    }
-
-    //Actually try to play the movie
+    // Actually try to play the movie, even though it may not be loaded yet.
     HRESULT hr = m_pAM->Run();
     if(SUCCEEDED(hr))
     {
     HRESULT hr = m_pAM->Run();
     if(SUCCEEDED(hr))
     {