summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2015-07-22 14:24:47 -0300
committerJoshua Colp <jcolp@digium.com>2015-07-22 14:24:47 -0300
commitf509730cb93875ba0a78835fd38b8dbd1cdff3f7 (patch)
tree90bc00c3f23c6b76e47837ecac1410431dd09fc4 /main
parentd16347f33b04ee449481f00189cc6b432e9da682 (diff)
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
Diffstat (limited to 'main')
-rw-r--r--main/audiohook.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/main/audiohook.c b/main/audiohook.c
index 73485e46f..217e176e9 100644
--- a/main/audiohook.c
+++ b/main/audiohook.c
@@ -1009,13 +1009,16 @@ static struct ast_frame *audio_audiohook_write_list(struct ast_channel *chan, st
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;