From d91b0eaa2867f57840e7bd91cdfca06a3c9f2b9e Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 28 Oct 2014 15:59:58 +0100 Subject: [PATCH] fix video payload becoming unusable by mistake --- coreapi/misc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coreapi/misc.c b/coreapi/misc.c index efca3c9f9..81365f5a2 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -251,7 +251,8 @@ bool_t linphone_core_is_payload_type_usable_for_bandwidth(LinphoneCore *lc, cons /* return TRUE if codec can be used with bandwidth, FALSE else*/ bool_t linphone_core_check_payload_type_usability(LinphoneCore *lc, const PayloadType *pt){ bool_t ret=linphone_core_is_payload_type_usable_for_bandwidth(lc, pt, linphone_core_get_payload_type_bitrate(lc,pt)); - if (lc->sound_conf.capt_sndcard + if ((pt->type==PAYLOAD_AUDIO_CONTINUOUS || pt->type==PAYLOAD_AUDIO_PACKETIZED) + && lc->sound_conf.capt_sndcard && !(ms_snd_card_get_capabilities(lc->sound_conf.capt_sndcard) & MS_SND_CARD_CAP_BUILTIN_ECHO_CANCELLER) && linphone_core_echo_cancellation_enabled(lc) && (pt->clock_rate!=16000 && pt->clock_rate!=8000)