RE: CR: Bug 244570: Output without "Filename" defined in multiple output job causes crash.

"Eric Hyche" <[email protected]>
Newsgroups gmane.comp.multimedia.helix.devel
Organization RealNetworks, Inc.
Message-ID <003a01c9f663$058865b0$10993110$@com>
Looks good.

=======================================
Eric Hyche ([email protected])
Principal Engineer
RealNetworks, Inc.


>-----Original Message-----
>From: [email protected] [mailto:[email protected]]
>On Behalf Of [email protected]
>Sent: Thursday, June 25, 2009 6:48 PM
>To: [email protected]; [email protected]
>Subject: [Helix-client-dev] CR: Bug 244570: Output without "Filename" defined in multiple output job
>causes crash.
>
>Synopsis
>========
>Bug 244570: Output without "Filename" defined in multiple output job
>causes crash.
>
>Branches: PRODUCER_13_0_RN and HEAD.
>Suggested Reviewer: Anyone.
>
>
>Description
>===========
>Issue was when one of destination file name was not set, it's
>CHXTOutputDest was not initialized.
>
>When destination filter with file name present sends a event like temp
>file created, it was passed to all CHXTOutputDest.
>This was resulting in crash in un-initialized CHXTOutputDest.
>
>I don't know what could be reason that we need to send event to all
>CHXTOutputDest instead of just correct CHXTOutputDest.
>Possible reason could be that it was not straight forward to determine
>correct CHXTOutputDest.
>
>Fix was to add a check in CHXTOutputDest to ensure that it is initialized.
>
>In producer active-x control commented the code to setJobReady till bug
>244764 is resolved as this was causing issue with serialize and
>de-serialize when new job is set. (This was not seen earlier.)
>
>Files Affected
>==============
>client/encodesvc/engine/encsession/outputdest.cpp
>client/encodesvc/activex/ctrl/ProducerCtrl.cpp
>
>Testing Performed
>=================
>Tested bug repro case with command line and GUI producers and confirmed
>that encode continues.
>
>Performance Tests:
>- None
>
>Platforms Tested: win32-i386-vc7
>Build verified: win32-i386-vc7
>
>QA Hints
>========
>Please also test on machine with multiple capture cards.
>
>Index: outputdest.cpp
>===================================================================
>RCS file: /cvsroot/client/encodesvc/engine/encsession/outputdest.cpp,v
>retrieving revision 1.6.2.1
>diff -u -r1.6.2.1 outputdest.cpp
>--- outputdest.cpp	11 Jun 2009 22:54:31 -0000	1.6.2.1
>+++ outputdest.cpp	25 Jun 2009 20:13:05 -0000
>@@ -1125,6 +1125,13 @@
> STDMETHODIMP CHXTOutputDest::HandleEvent( EHXTEvent eEvent, UINT32*
>pulValue, const char* szValue, IUnknown* pUnknown )
> {
>     HX_RESULT res = HXR_OK;
>+
>+    if (!isInitDone() || isForceInit()|| !m_spConfigAgent)
>+    {
>+	HXTLOG_APPROVED(LC_SDK_ERROR, FA_SDK_ENCODE, "Event received for an
>unitialized Destination");
>+	HX_ASSERT(FALSE);
>+	return HXR_FAIL;
>+    }
>
>     // Note: No need for synchronization yet -- EncodingJob enforces
>things..
>
>===================================================================
>RCS file: /cvsroot/client/encodesvc/activex/ctrl/ProducerCtrl.cpp,v
>retrieving revision 1.3.2.3
>diff -u -r1.3.2.3 ProducerCtrl.cpp
>--- ProducerCtrl.cpp	25 Jun 2009 04:03:49 -0000	1.3.2.3
>+++ ProducerCtrl.cpp	25 Jun 2009 21:35:12 -0000
>@@ -6366,7 +6366,11 @@
> 	UpdateCodecsInJob();
>     }
>
>-    SetJobIsReadyFlag();
>+    //De-serilize and Serialize on Capture input results in failure.
>+    //Bug 244764 hence commenting call to SetJobIsReadyFlag and setting.
>+    //m_bIsJobReady to true.
>+    //SetJobIsReadyFlag();
>+    m_bIsJobReady = TRUE;
>
>     m_lfJobStartTime = 0;
>
>@@ -6627,6 +6631,11 @@
>     BOOL bFoundAudioGain = FALSE;
>     HX_RESULT res = HXR_OK;
>
>+    if (!m_spJob)
>+    {
>+	return HXR_FAIL;
>+    }
>+
>     res = m_spJob->GetInput( spInput.Adopt() );
>
>     //Scan for audio gain prefilter.
>@@ -6732,6 +6741,11 @@
> STDMETHODIMP
> CProducerCtrl::AddAudioGainPrefilter(double lfAudioGain)
> {
>+    if (!m_spJob)
>+    {
>+	return HXR_FAIL;
>+    }
>+
>     VARIANT_BOOL bIsRunning = VARIANT_FALSE;
>     IHXTPrefilterPtr spPrefilter;
>
>
>
>
>_______________________________________________
>Helix-client-dev mailing list
>[email protected]
>http://lists.helixcommunity.org/mailman/listinfo/helix-client-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.