[asterisk-commits] oej: branch oej/silence-detection-games-1.8 r411922 - in /team/oej/silence-de...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 8 09:00:55 CDT 2014


Author: oej
Date: Tue Apr  8 09:00:51 2014
New Revision: 411922

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=411922
Log:
Fixing stuff.

Modified:
    team/oej/silence-detection-games-1.8/channels/chan_sip.c
    team/oej/silence-detection-games-1.8/main/audiohook.c

Modified: team/oej/silence-detection-games-1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/silence-detection-games-1.8/channels/chan_sip.c?view=diff&rev=411922&r1=411921&r2=411922
==============================================================================
--- team/oej/silence-detection-games-1.8/channels/chan_sip.c (original)
+++ team/oej/silence-detection-games-1.8/channels/chan_sip.c Tue Apr  8 09:00:51 2014
@@ -7482,12 +7482,14 @@
 
 		/* We now have a call where we have a DSP. The rest of the magic is happening somewhere else in chan_sip. */
 		ast_debug(3, "SILDET: Activated silence suppression on call %s\n", dialog->callid);
+#ifdef ISTHISNEEDED
 		if ((res = ast_set_read_format(dialog->owner, AST_FORMAT_SLINEAR)) < 0) {
 			/* Put channel in the right codec mode: SLINEAR */
 			ast_log(LOG_WARNING, "Unable to set channel to linear mode, giving up\n");
 			ast_sildet_deactivate(dialog->owner);
 			return FALSE;
 		}
+#endif
 	} else {
 		ast_debug(3, "SILDET: Failed to activate silence detection on call %s\n", dialog->callid);
 	}

Modified: team/oej/silence-detection-games-1.8/main/audiohook.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/silence-detection-games-1.8/main/audiohook.c?view=diff&rev=411922&r1=411921&r2=411922
==============================================================================
--- team/oej/silence-detection-games-1.8/main/audiohook.c (original)
+++ team/oej/silence-detection-games-1.8/main/audiohook.c Tue Apr  8 09:00:51 2014
@@ -730,7 +730,7 @@
 
 	if (middle_frame == end_frame) {
 		/* Middle frame was modified and became the end frame... let's see if we need to transcode */
-		if (end_frame->subclass.codec != start_frame->subclass.codec) {
+		if (end_frame->frametype == AST_FRAME_AUDIO && end_frame->subclass.codec != start_frame->subclass.codec) {
 			if (out_translate->format != start_frame->subclass.codec) {
 				if (out_translate->trans_pvt)
 					ast_translator_free_path(out_translate->trans_pvt);




More information about the asterisk-commits mailing list