- fixed format adaption in rtp mode
This commit is contained in:
parent
5a720165ff
commit
63ea97c952
|
@ -1539,7 +1539,7 @@ static int capi_write(struct ast_channel *c, struct ast_frame *f)
|
|||
if (i->isdnstate & CAPI_ISDN_STATE_RTP) {
|
||||
if ((!(f->subclass & i->codec)) &&
|
||||
(f->subclass != capi_capability)) {
|
||||
cc_log(LOG_ERROR, "dont know how to write subclass %s(%d)\n",
|
||||
cc_log(LOG_ERROR, "don't know how to write subclass %s(%d)\n",
|
||||
ast_getformatname(f->subclass), f->subclass);
|
||||
cc_mutex_unlock(&i->lock);
|
||||
return 0;
|
||||
|
@ -2058,7 +2058,7 @@ capi_request(char *type, int format, void *data)
|
|||
unsigned int foundcontroller;
|
||||
int notfound = 1;
|
||||
|
||||
cc_verbose(1, 1, VERBOSE_PREFIX_4 "data = %s\n", (char *)data);
|
||||
cc_verbose(1, 1, VERBOSE_PREFIX_4 "data = %s format=%d\n", (char *)data, format);
|
||||
|
||||
cc_copy_string(buffer, (char *)data, sizeof(buffer));
|
||||
parse_dialstring(buffer, &interface, &dest, ¶m, &ocid);
|
||||
|
|
|
@ -303,12 +303,12 @@ struct ast_frame *capi_read_rtp(struct capi_pvt *i, unsigned char *buf, int len)
|
|||
cc_verbose(6, 1, VERBOSE_PREFIX_4 "%s: DATA_B3_IND RTP NCCI=%#x len=%d %s (read/write=%d/%d)\n",
|
||||
i->name, i->NCCI, len, ast_getformatname(f->subclass),
|
||||
i->owner->readformat, i->owner->writeformat);
|
||||
if (i->owner->readformat != f->subclass) {
|
||||
cc_verbose(3, 1, VERBOSE_PREFIX_3 "%s: DATA_B3_IND RTP readformat=%d, but subclass=%d\n",
|
||||
i->name, i->owner->readformat, f->subclass);
|
||||
/* i->owner->nativeformats = i->rtpcodec; */
|
||||
ast_set_read_format(i->owner, i->codec);
|
||||
/* ast_set_write_format(i->owner, i->codec); */
|
||||
if (i->owner->nativeformats != f->subclass) {
|
||||
cc_verbose(3, 1, VERBOSE_PREFIX_3 "%s: DATA_B3_IND RTP nativeformats=%d, but subclass=%d\n",
|
||||
i->name, i->owner->nativeformats, f->subclass);
|
||||
i->owner->nativeformats = f->subclass;
|
||||
ast_set_read_format(i->owner, i->owner->readformat);
|
||||
ast_set_write_format(i->owner, i->owner->writeformat);
|
||||
}
|
||||
}
|
||||
return f;
|
||||
|
|
Loading…
Reference in New Issue