Merge "chan_pjsip: Don't change formats when frame of unsupported format is received."
This commit is contained in:
commit
6741eedece
1 changed files with 9 additions and 0 deletions
|
@ -629,6 +629,15 @@ static struct ast_frame *chan_pjsip_read(struct ast_channel *ast)
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ast_format_cap_iscompatible_format(channel->session->endpoint->media.codecs, f->subclass.format) == AST_FORMAT_CMP_NOT_EQUAL) {
|
||||||
|
ast_debug(1, "Oooh, got a frame with format of %s on channel '%s' when endpoint '%s' is not configured for it\n",
|
||||||
|
ast_format_get_name(f->subclass.format), ast_channel_name(ast),
|
||||||
|
ast_sorcery_object_get_id(channel->session->endpoint));
|
||||||
|
|
||||||
|
ast_frfree(f);
|
||||||
|
return &ast_null_frame;
|
||||||
|
}
|
||||||
|
|
||||||
if (channel->session->dsp) {
|
if (channel->session->dsp) {
|
||||||
f = ast_dsp_process(ast, channel->session->dsp, f);
|
f = ast_dsp_process(ast, channel->session->dsp, f);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue