[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-datatype-cvs
Subject:    [Datatype-cvs] tools/minicntx minicntx.cpp,1.26.10.8,1.26.10.9
From:       stanb () helixcommunity ! org
Date:       2011-10-28 23:13:36
[Download RAW message or body]

Update of /cvsroot/datatype/tools/minicntx
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv9841/minicntx

Modified Files:
      Tag: hxclient_3_1_0_atlas
	minicntx.cpp 
Log Message:
Modified by: stanb@real.com
Date: 10/21/2011
Project: WinAgent (UNIFI), RealPlayer 15

Bug Number: 404918

Synopsis: For each FLV file processing a new MiniContext/CHXMediaPlatform is created \
and never destroyed.

Overview: Incorrect releasing of external context in CHXMediaPlatform was forcing \
work-arounds in DTDriver and I guess memory leaks were preferred to crashes. After \
fixing CHXMediaPlatform we can actually have a sane pointer manipulation and avoid \
memory leaks in DTDriver.  Calling m_pContext->Destruct(); is a must as otherwise it \
only gets called out of ~MiniContext() which would never happen as there are multiple \
self-references that are never release until Destruct() is called (m_pMediaPlatform, \
m_pPlatformCommonClassFactory).


Files Modified:
datatype/tools/dtdriver/engine/ffdriver.cpp
datatype/tools/minicntx/minicntx.cpp

Branch: 310atlas, HEAD


Modified by: stanb@real.com
Date: 10/21/2011
Project: WinAgent (UNIFI), RealPlayer 15

Bug Number: 404918

Synopsis: For each FLV file processing a new MiniContext/CHXMediaPlatform is created \
and never destroyed.

Overview: Another reference to MiniContext/CHXMediaPlatform stays open because of \
particular implementation of CSecureSourceHandler in \
datatype_rn\tools\dtdriver\engine. It actually proxies all AddRef, Release and \
QueryInterface calls to it’s m_pOwner->m_pTrueSourceSink. The problem is that \
CSourceTransferPort::OnTermination() causes m_pTrueSourceSink of the m_pOwner to get \
released (inside CSecureSourceHandler::Close()), so the following \
HX_RELEASE(pSourceSink) has no effect whatsoever. This fix gets actual “True” \
SourceSink via m_pSourceSink->QueryInterface(IID_IUnknown,..) which makes sure we do \
AddRef() / OnTermination() / Release() on the same object.



Files Modified:
datatype/tools/dtdriver/engine/csrchdlr.cpp 

Branch: 310atlas, HEAD



Index: minicntx.cpp
===================================================================
RCS file: /cvsroot/datatype/tools/minicntx/minicntx.cpp,v
retrieving revision 1.26.10.8
retrieving revision 1.26.10.9
diff -u -d -r1.26.10.8 -r1.26.10.9
--- minicntx.cpp	12 Oct 2010 22:10:57 -0000	1.26.10.8
+++ minicntx.cpp	28 Oct 2011 23:13:33 -0000	1.26.10.9
@@ -754,19 +754,12 @@
     HX_RELEASE(m_pPlatformCommonClassFactory);
     HX_RELEASE(m_pClientContext);
     HX_RELEASE(m_pPlatformKicker);
+
     if (m_pMediaPlatform)
     {
-	IHXMediaPlatform* pMediaPlatform = m_pMediaPlatform;
-	m_pMediaPlatform = NULL;
-
-	// Since we have aggregated ourselves into media platform, 
-	// closing the media platform is isntant death for this object.
-	// For this reason any further processing must be done
-	// on stack variables or we may cause a memory fault.
-
-	pMediaPlatform->Close();
-	pMediaPlatform->Release();
+	m_pMediaPlatform->Close();
     }
+    HX_RELEASE(m_pMediaPlatform);
 
     return HXR_OK;
 }


_______________________________________________
Datatype-cvs mailing list
Datatype-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/datatype-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic