[Asterisk-code-review] audiohook: Use manipulated frame instead of dropping it. (asterisk[13])
Joshua Colp
asteriskteam at digium.com
Wed Jul 22 12:34:00 CDT 2015
Joshua Colp has uploaded a new change for review.
https://gerrit.asterisk.org/952
Change subject: audiohook: Use manipulated frame instead of dropping it.
......................................................................
audiohook: Use manipulated frame instead of dropping it.
Previous changes to sample rate support in audiohooks accidentally
removed code responsible for allowing the manipulate audiohooks
to work. Without this code the manipulated frame would be dropped
and not used. This change restores it.
ASTERISK-25253 #close
Change-Id: I3ff50664cd82faac8941f976fcdcb3918a50fe13
---
M main/audiohook.c
1 file changed, 9 insertions(+), 6 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/52/952/1
diff --git a/main/audiohook.c b/main/audiohook.c
index 73485e4..217e176 100644
--- a/main/audiohook.c
+++ b/main/audiohook.c
@@ -1009,13 +1009,16 @@
audiohook_list_set_hook_rate(audiohook_list, audiohook, &internal_sample_rate);
/*
* Feed in frame to manipulation.
- *
- * XXX FAILURES ARE IGNORED XXX
- * If the manipulation fails then the frame will be returned in its original state.
- * Since there are potentially more manipulator callbacks in the list, no action should
- * be taken here to exit early.
*/
- audiohook->manipulate_callback(audiohook, chan, middle_frame, direction);
+ if (!audiohook->manipulate_callback(audiohook, chan, middle_frame, direction)) {
+ /*
+ * XXX FAILURES ARE IGNORED XXX
+ * If the manipulation fails then the frame will be returned in its original state.
+ * Since there are potentially more manipulator callbacks in the list, no action should
+ * be taken here to exit early.
+ */
+ middle_frame_manipulated = 1;
+ }
ast_audiohook_unlock(audiohook);
}
AST_LIST_TRAVERSE_SAFE_END;
--
To view, visit https://gerrit.asterisk.org/952
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ff50664cd82faac8941f976fcdcb3918a50fe13
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
More information about the asterisk-code-review
mailing list