[svn-commits] seanbright: branch 10 r349145 - in /branches/10: ./ main/audiohook.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Dec 27 11:17:17 CST 2011


Author: seanbright
Date: Tue Dec 27 11:17:13 2011
New Revision: 349145

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=349145
Log:
Once an audiohook is attached to a channel, we continue to transcode all of the
frames, even after all of the hooks are detached.  This patch short-cicuits us
out before we transcode unnecessarily.
........

Merged revisions 349144 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/10/   (props changed)
    branches/10/main/audiohook.c

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/main/audiohook.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/main/audiohook.c?view=diff&rev=349145&r1=349144&r2=349145
==============================================================================
--- branches/10/main/audiohook.c (original)
+++ branches/10/main/audiohook.c Tue Dec 27 11:17:13 2011
@@ -783,6 +783,12 @@
 	int middle_frame_manipulated = 0;
 	int removed = 0;
 
+	/* Don't translate our frame if we aren't going to bother to use it */
+	if (AST_LIST_EMPTY(&audiohook_list->spy_list)
+		&& AST_LIST_EMPTY(&audiohook_list->whisper_list)
+		&& AST_LIST_EMPTY(&audiohook_list->manipulate_list))
+		return end_frame;
+
 	/* ---Part_1. translate start_frame to SLINEAR if necessary. */
 	if (!(middle_frame = audiohook_list_translate_to_slin(audiohook_list, direction, start_frame))) {
 		return frame;




More information about the svn-commits mailing list