Codec support for resource PLCI wass not wworking properly

This commit is contained in:
MelwareDE 2010-10-02 00:00:57 +00:00
parent 8d916f3f90
commit 20d86c8a67
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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) {