[Freeswitch-dev] codecs initialization flags in endpoint modules

Lele Forzani lele at windmill.it
Fri Apr 10 07:53:58 PDT 2009


On Thu, 2009-04-09 at 12:41 -0500, Anthony Minessale wrote:

> please try now with latest code that should delay the init of the
> resources until they are in use so cases where they are not used both
> ways will not cost a hw resource.
> 

Thanks a lot Anthony,

there is still a minor typo in mod_dahdi_codec, that was already there,
but not causing as much harm as now, since encoders and decoders were
always initialized in pairs.

I'm pasting the diff in the mail body since it's a two letters change.

--- src/mod/codecs/mod_dahdi_codec/mod_dahdi_codec.c-	2009-04-11 18:24:04.000000000 +0200
+++ src/mod/codecs/mod_dahdi_codec/mod_dahdi_codec.c	2009-04-11 18:24:11.000000000 +0200
@@ -126,7 +126,7 @@
 	fmts.dstfmt = (codec->implementation->ianacode == CODEC_G729_IANA_CODE) 
 		? DAHDI_FORMAT_G729A : DAHDI_FORMAT_G723_1;
 	context->encoding_fd = switch_dahdi_get_transcoder(&fmts);
-	if (context->decoding_fd < 0) {
+	if (context->encoding_fd < 0) {
 #ifdef DEBUG_DAHDI_CODEC
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "encoding requested and denied with %d/%d.\n",
 						  fmts.srcfmt, fmts.dstfmt);


Other than that, it seems working, and the resource usage is what it was
expected.

Thanks,
l.




More information about the Freeswitch-dev mailing list