[asterisk-commits] irroot: branch irroot/distrotech-customers-trunk r324913 - /team/irroot/distr...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Jun 26 08:38:43 CDT 2011


Author: irroot
Date: Sun Jun 26 08:38:34 2011
New Revision: 324913

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=324913
Log:
Check nativeformats and nativeformat not only nativeformats
This will stop the format changing on every packet
working for DAHDI and SIP


Modified:
    team/irroot/distrotech-customers-trunk/main/channel.c

Modified: team/irroot/distrotech-customers-trunk/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/main/channel.c?view=diff&rev=324913&r1=324912&r2=324913
==============================================================================
--- team/irroot/distrotech-customers-trunk/main/channel.c (original)
+++ team/irroot/distrotech-customers-trunk/main/channel.c Sun Jun 26 08:38:34 2011
@@ -4931,7 +4931,8 @@
 			apply_plc(chan, fr);
 		}
 
-		if (!(ast_format_cap_iscompatible(chan->nativeformats, &fr->subclass.format))) {
+		if ((!ast_format_cap_iscompatible(chan->nativeformats, &fr->subclass.format)) &&
+		    (ast_format_cmp(&chan->writeformat, &fr->subclass.format) != AST_FORMAT_CMP_EQUAL)) {
 			ast_set_write_format_by_id(chan, fr->subclass.format.id);
 		}
 




More information about the asterisk-commits mailing list