142
142
struct ast_datastore *datastore = NULL;
143
143
struct speex_direction_info *sdi = NULL;
144
144
struct speex_info *si = NULL;
146
147
/* If the audiohook is stopping it means the channel is shutting down.... but we let the datastore destroy take care of it */
147
148
if (audiohook->status == AST_AUDIOHOOK_STATUS_DONE || frame->frametype != AST_FRAME_VOICE) {
152
153
if (!(datastore = ast_channel_datastore_find(chan, &speex_datastore, NULL))) {
160
159
sdi = (direction == AST_AUDIOHOOK_DIRECTION_READ) ? si->rx : si->tx;
166
165
if (sdi->samples != frame->samples) {