From 20d86c8a675f7113823506ebcb7c56cdb18bb975 Mon Sep 17 00:00:00 2001 From: MelwareDE Date: Sat, 2 Oct 2010 00:00:57 +0000 Subject: [PATCH] Codec support for resource PLCI wass not wworking properly --- chan_capi_chat.c | 2 +- chan_capi_utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chan_capi_chat.c b/chan_capi_chat.c index e664c5d..3446d58 100644 --- a/chan_capi_chat.c +++ b/chan_capi_chat.c @@ -446,7 +446,7 @@ static void chat_handle_events(struct ast_channel *c, struct capi_pvt *i, waitfd = i->readerfd; if (i->channeltype == CAPI_CHANNELTYPE_NULL) { - int fmt = (i->bproto == CC_BPROTO_VOCODER) ? i->codec : capi_capability; + int fmt = (i->line_plci != 0 && i->line_plci->bproto == CC_BPROTO_VOCODER) ? i->line_plci->codec : capi_capability; nfds = 1; ast_set_read_format(chan, fmt); ast_set_write_format(chan, fmt); diff --git a/chan_capi_utils.c b/chan_capi_utils.c index b880036..b9a2dc3 100644 --- a/chan_capi_utils.c +++ b/chan_capi_utils.c @@ -1442,7 +1442,7 @@ int capi_write_frame(struct capi_pvt *i, struct ast_frame *f) return 0; } - if (i->bproto == CC_BPROTO_VOCODER) { + if (i->bproto == CC_BPROTO_VOCODER || (i->line_plci != 0 && i->line_plci->bproto == CC_BPROTO_VOCODER)) { #ifdef DIVA_STREAMING capi_DivaStreamLock(); if (i->diva_stream_entry != 0) {