< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[sipxtapi-dev] sipxConfigGetNumAudioCodecs asserts if no codecs were found


Hi,

sipxConfigGetNumAudioCodecs asserts if no codecs were found. This is apparently because pInst->audioCodecSetting is not initialized in this case:

SIPXTAPI_API SIPX_RESULT sipxConfigGetNumAudioCodecs(const SIPX_INST hInst,
                                                     int* pNumCodecs)
{
...
        assert(pInst->audioCodecSetting.bInitialized);
...
}


My program is checking the number of loaded codecs. If none were loaded, it would normally indicate a problem, but this assertion makes it impossible to check programmatically (using sipxConfigGetNumAudioCodecs, in any case). Is there another way to determine that no codecs were loaded? Or would it be unreasonable for sipxConfigGetNumAudioCodecs to just return zero (in the pNumCodecs arg) in this case?


Finest regards,
Bill Root