[asterisk-commits] seanbright: trunk r349146 - in /trunk: ./ main/audiohook.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Dec 27 11:17:59 CST 2011
Author: seanbright
Date: Tue Dec 27 11:17:58 2011
New Revision: 349146
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=349146
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
........
Merged revisions 349145 from http://svn.asterisk.org/svn/asterisk/branches/10
Modified:
trunk/ (props changed)
trunk/main/audiohook.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.
Modified: trunk/main/audiohook.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/audiohook.c?view=diff&rev=349146&r1=349145&r2=349146
==============================================================================
--- trunk/main/audiohook.c (original)
+++ trunk/main/audiohook.c Tue Dec 27 11:17:58 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 asterisk-commits
mailing list