summaryrefslogtreecommitdiff
path: root/main/audiohook.c
diff options
context:
space:
mode:
authorMatt Jordan <mjordan@digium.com>2015-07-22 20:02:26 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2015-07-22 20:02:26 -0500
commit4d8f47f4bffc8d750e8b0bcc8e5242577b6adfc1 (patch)
treee1752183d6b79e8073b96da49fd67debb3aa29fd /main/audiohook.c
parentff83c115c753adbb3208d739c13a2854ced093ed (diff)
parentf509730cb93875ba0a78835fd38b8dbd1cdff3f7 (diff)
Merge "audiohook: Use manipulated frame instead of dropping it." into 13
Diffstat (limited to 'main/audiohook.c')
-rw-r--r--main/audiohook.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/main/audiohook.c b/main/audiohook.c
index b64df0cd9..5595e88b7 100644
--- a/main/audiohook.c
+++ b/main/audiohook.c
@@ -1019,13 +1019,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;