diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c index bf90f55c70f4ae8f0398670c06aaae8a37e603b7..422d6e74ddf2e2cada3d4368babd39507153a6f1 100644 --- a/apps/app_speech_utils.c +++ b/apps/app_speech_utils.c @@ -533,8 +533,7 @@ static int speech_streamfile(struct ast_channel *chan, const char *filename, con if (ast_applystream(chan, fs)) return -1; - if (ast_playstream(fs)) - return -1; + ast_playstream(fs); return 0; } diff --git a/main/file.c b/main/file.c index 3c809e9c02b771ca2d1a25d92d67dec93f9ad65b..699df5aa960dbc9e8f6db0eb5ec69c939a4fcfba 100644 --- a/main/file.c +++ b/main/file.c @@ -794,10 +794,9 @@ int ast_streamfile(struct ast_channel *chan, const char *filename, const char *p return -1; if (vfs && ast_applystream(chan, vfs)) return -1; - if (ast_playstream(fs)) - return -1; - if (vfs && ast_playstream(vfs)) - return -1; + ast_playstream(fs); + if (vfs) + ast_playstream(vfs); if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "<%s> Playing '%s.%s' (language '%s')\n", chan->name, filename, ast_getformatname(chan->writeformat), preflang ? preflang : "default"); diff --git a/res/res_agi.c b/res/res_agi.c index 22c15f661372b6c40345f80c187fb167adf3936a..dc4bbd7f76f524a622a09d3268e47656eb9ff580 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -602,14 +602,10 @@ static int handle_streamfile(struct ast_channel *chan, AGI *agi, int argc, char res = ast_applystream(chan, fs); if (vfs) vres = ast_applystream(chan, vfs); - res = ast_playstream(fs); + ast_playstream(fs); if (vfs) - vres = ast_playstream(vfs); + ast_playstream(vfs); - if (res) { - fdprintf(agi->fd, "200 result=%d endpos=%ld\n", res, sample_offset); - return (res >= 0) ? RESULT_SHOWUSAGE : RESULT_FAILURE; - } res = ast_waitstream_full(chan, argv[3], agi->audio, agi->ctrl); /* this is to check for if ast_waitstream closed the stream, we probably are at * the end of the stream, return that amount, else check for the amount */ @@ -666,16 +662,10 @@ static int handle_getoption(struct ast_channel *chan, AGI *agi, int argc, char * res = ast_applystream(chan, fs); if (vfs) vres = ast_applystream(chan, vfs); - res = ast_playstream(fs); + ast_playstream(fs); if (vfs) - vres = ast_playstream(vfs); - if (res) { - fdprintf(agi->fd, "200 result=%d endpos=%ld\n", res, sample_offset); - if (res >= 0) - return RESULT_SHOWUSAGE; - else - return RESULT_FAILURE; - } + ast_playstream(vfs); + res = ast_waitstream_full(chan, argv[3], agi->audio, agi->ctrl); /* this is to check for if ast_waitstream closed the stream, we probably are at * the end of the stream, return that amount, else check for the amount */