aboutsummaryrefslogtreecommitdiffstats
path: root/app.c
diff options
context:
space:
mode:
authorbweschke <bweschke@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-11 01:12:13 +0000
committerbweschke <bweschke@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-11 01:12:13 +0000
commit5bd391eb84b15d6ddc27ced3e04a4a8c841afebe (patch)
treef330b175b4e2503c37ee32789e54a45889cbaa53 /app.c
parent483e826311511fc52ec00a0155582a73fd2db625 (diff)
Merged revisions 19008 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r19008 | bweschke | 2006-04-10 20:05:01 -0500 (Mon, 10 Apr 2006) | 3 lines When using the silence detector in ast_play_and_record() and ast_play_and_prepend(), the truncation code never gets called to remove the detected silence, because the value of res is zero when control gets to that point. #6903 w/some mods (softins) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@19009 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'app.c')
-rw-r--r--app.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/app.c b/app.c
index e6c7f4625..bdd76ce84 100644
--- a/app.c
+++ b/app.c
@@ -552,7 +552,6 @@ int ast_play_and_record(struct ast_channel *chan, const char *playfile, const ch
struct ast_dsp *sildet=NULL; /* silence detector dsp */
int totalsilence = 0;
int dspsilence = 0;
- int gotsilence = 0; /* did we timeout for silence? */
int rfmt=0;
struct ast_silence_generator *silgen = NULL;
@@ -675,7 +674,7 @@ int ast_play_and_record(struct ast_channel *chan, const char *playfile, const ch
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Recording automatically stopped after a silence of %d seconds\n", totalsilence/1000);
ast_frfree(f);
- gotsilence = 1;
+ res = 'S';
outmsg=2;
break;
}
@@ -779,7 +778,6 @@ int ast_play_and_prepend(struct ast_channel *chan, char *playfile, char *recordf
struct ast_dsp *sildet; /* silence detector dsp */
int totalsilence = 0;
int dspsilence = 0;
- int gotsilence = 0; /* did we timeout for silence? */
int rfmt=0;
char prependfile[80];
@@ -898,7 +896,7 @@ int ast_play_and_prepend(struct ast_channel *chan, char *playfile, char *recordf
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Recording automatically stopped after a silence of %d seconds\n", totalsilence/1000);
ast_frfree(f);
- gotsilence = 1;
+ res = 'S';
outmsg=2;
break;
}