Added patch from Michael Gernoth to fix bridging by removing codec 'none'.

This commit is contained in:
MelwareDE 2019-01-22 08:03:48 +00:00
parent 07f6d27017
commit c02af7806f
3 changed files with 4 additions and 0 deletions

View File

@ -10,6 +10,7 @@ HEAD
(thanks to Maciej S. Szmigiero <mail@maciej.szmigiero.name>)
- support for Asterisk 13 (thanks to Michael Kuron <m.kuron@gmx.de>)
- fixed check of asterisk version with asterisk binary if another install path is used.
- remove codec 'none' from translation path which prevents bridge.
chan_capi-1.1.6

View File

@ -9422,6 +9422,7 @@ int load_module(void)
} else {
#ifdef CC_AST_HAS_VERSION_13_0
struct ast_format * fmt = ast_format_alaw;
ast_format_cap_remove_by_type(capi_tech.capabilities, AST_MEDIA_TYPE_AUDIO);
ast_format_cap_append(capi_tech.capabilities, fmt, 0);
#else
struct ast_format fmt;

View File

@ -76,6 +76,7 @@ static inline void cc_add_formats(struct ast_format_cap *fmts, unsigned int diva
if ((divaFormats & ccCodec) != 0) {
#ifdef CC_AST_HAS_VERSION_13_0
struct ast_format * id = ccCodec2AstCodec (ccCodec);
ast_format_cap_remove_by_type(fmts, AST_MEDIA_TYPE_AUDIO);
ast_format_cap_append(fmts, id, 0);
#else
enum ast_format_id id = ccCodec2AstCodec (ccCodec);
@ -201,6 +202,7 @@ static inline int cc_get_best_codec_as_bits(int src)
struct ast_format *format;
format = ast_format_compatibility_bitfield2format(mask);
ast_format_cap_remove_by_type(dst, AST_MEDIA_TYPE_AUDIO);
if (format && ast_format_cap_append(dst, format, 0)) {
return 0;
}