summaryrefslogtreecommitdiff
path: root/funcs/func_speex.c
diff options
context:
space:
mode:
Diffstat (limited to 'funcs/func_speex.c')
-rw-r--r--funcs/func_speex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/funcs/func_speex.c b/funcs/func_speex.c
index 4e3c13b87..d0d451bd1 100644
--- a/funcs/func_speex.c
+++ b/funcs/func_speex.c
@@ -165,8 +165,8 @@ static int speex_callback(struct ast_audiohook *audiohook, struct ast_channel *c
return -1;
}
- if ((sdi->samples != frame->samples) || (ast_format_rate(&frame->subclass.format) != si->lastrate)) {
- si->lastrate = ast_format_rate(&frame->subclass.format);
+ if ((sdi->samples != frame->samples) || (ast_format_get_sample_rate(frame->subclass.format) != si->lastrate)) {
+ si->lastrate = ast_format_get_sample_rate(frame->subclass.format);
if (sdi->state) {
speex_preprocess_state_destroy(sdi->state);
}