summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Jordan <mjordan@digium.com>2015-07-22 20:02:30 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2015-07-22 20:02:30 -0500
commitffb679f7b575effdcd9b327912b81fff4b7e6475 (patch)
tree06d4f9133c177eef48776f8d3e2536ebdba58bce
parent43173f073c6055f5b46c8e0b7f86e455c7f99336 (diff)
parent1cc99ba8b641e346dce2e3567db580adc9809eeb (diff)
Merge "audiohook: Use manipulated frame instead of dropping it."
-rw-r--r--main/audiohook.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/main/audiohook.c b/main/audiohook.c
index 641264a98..ba1ecd4fd 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;