diff options
author | Matt Jordan <mjordan@digium.com> | 2015-07-20 07:31:38 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2015-07-20 07:31:38 -0500 |
commit | 34207887e6e6adbd7c9ff9e9ea1954d612e125a4 (patch) | |
tree | e047588b6e90b20762b5d93f5fad8c8a99f3c701 /channels | |
parent | 8a1d9a9f83e35896865cbbd0196a871c5472e84f (diff) | |
parent | 2c626ceb64e11f7d18b97023f09072a992060121 (diff) |
Merge "chan_pjsip: Don't change formats when frame of unsupported format is received." into 13
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_pjsip.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c index c6a02d9c7..919b92618 100644 --- a/channels/chan_pjsip.c +++ b/channels/chan_pjsip.c @@ -629,6 +629,15 @@ static struct ast_frame *chan_pjsip_read(struct ast_channel *ast) 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) { f = ast_dsp_process(ast, channel->session->dsp, f); |