Re: CloseComponent
Re: CloseComponent
- Subject: Re: CloseComponent
- From: Brad Ford <email@hidden>
- Date: Thu, 11 Jan 2007 08:50:18 -0800
On Jan 10, 2007, at 10:34 PM, Sandeep Chandna wrote:
Hi,
To get the list of supported audio codecs in Quicktime I am doing
the following:
OpenADefaultComponent(StandardCompressionType,
StandardCompressionSubTypeAudio, &ci);
QTGetComponentPropertyInfo
(ci,kQTPropertyClass_SCAudio,kQTSCAudioPropertyID_AvailableCompression
FormatList,NULL,&listSize,NULL);
QTGetComponentProperty
(ci,kQTPropertyClass_SCAudio,kQTSCAudioPropertyID_AvailableCompression
FormatList,listSize,listFormats,&listSize);
QTGetComponentProperty
(ci,kQTPropertyClass_SCAudio,kQTSCAudioPropertyID_AvailableCompression
FormatNamesList,codecNamesListSize,&codecNamesList,&codecNamesListSize
);
//I get the list perfectly fine with above code
now when I do CloseComponent(ci); , it crashes complaining of bad
memory excess (EXC_BAD_ACCESS). If I dont do CloseComponent
everything goes fine. Am I missing out something here?
It's probably a crash in CF due to over-release. You don't show your
code for how you work with the FormatNamesList, but you should not be
CFRelease'ing individual CFStrings in the CFArray. When you're done
with the CFArray, you must call CFRelease(codecNamesList);
-Brad Ford
QuickTime Engineering
Thanks
Sandeep
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden