From: Mark Spencer Date: Sat, 7 Aug 2004 22:57:13 +0000 (+0000) Subject: Only consider linear frames for talk detection -- ignore anything else (bug #2219) X-Git-Tag: 1.0.0-rc2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=785eaf01b3a536c8a36e9dc4436e4d9dc037b824;p=thirdparty%2Fasterisk.git Only consider linear frames for talk detection -- ignore anything else (bug #2219) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3594 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_talkdetect.c b/apps/app_talkdetect.c index 79bac38594..0816949af8 100755 --- a/apps/app_talkdetect.c +++ b/apps/app_talkdetect.c @@ -130,7 +130,7 @@ static int background_detect_exec(struct ast_channel *chan, void *data) ast_frfree(fr); break; } - } else if (fr->frametype == AST_FRAME_VOICE) { + } else if ((fr->frametype == AST_FRAME_VOICE) && (fr->subclass == AST_FORMAT_SLINEAR)) { int totalsilence; int ms; res = ast_dsp_silence(dsp, fr, &totalsilence);