[asterisk-commits] irroot: branch irroot/distrotech-customers-10 r333490 - /team/irroot/distrote...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Aug 27 04:36:55 CDT 2011


Author: irroot
Date: Sat Aug 27 04:36:51 2011
New Revision: 333490

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=333490
Log:
Hack to make format compatible in ast_write where write format is not a native format

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

Modified: team/irroot/distrotech-customers-10/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-10/main/channel.c?view=diff&rev=333490&r1=333489&r2=333490
==============================================================================
--- team/irroot/distrotech-customers-10/main/channel.c (original)
+++ team/irroot/distrotech-customers-10/main/channel.c Sat Aug 27 04:36:51 2011
@@ -4925,6 +4925,11 @@
 			apply_plc(chan, fr);
 		}
 
+		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);
+		}
+
 		/* If the frame is in the raw write format, then it's easy... just use the frame - otherwise we will have to translate */
 		if (ast_format_cmp(&fr->subclass.format, &chan->rawwriteformat) != AST_FORMAT_CMP_NOT_EQUAL)
 			f = fr;




More information about the asterisk-commits mailing list