[mod_amr] scan-build: fix dead increment of fmtptmp_pos in switch_amr_init()

This commit is contained in:
Andrey Volk 2020-05-08 02:56:37 +04:00
parent 5b1088d39f
commit a2c657c7bb
1 changed files with 2 additions and 2 deletions

View File

@ -359,10 +359,10 @@ static switch_status_t switch_amr_init(switch_codec_t *codec, switch_codec_flag_
if (!globals.volte) { if (!globals.volte) {
fmtptmp_pos += switch_snprintf(fmtptmp + fmtptmp_pos, sizeof(fmtptmp) - fmtptmp_pos, ";octet-align=%d", switch_test_flag(context, AMR_OPT_OCTET_ALIGN) ? 1 : 0); switch_snprintf(fmtptmp + fmtptmp_pos, sizeof(fmtptmp) - fmtptmp_pos, ";octet-align=%d", switch_test_flag(context, AMR_OPT_OCTET_ALIGN) ? 1 : 0);
} else { } else {
/* some UEs reject the call with 488 if mode-change-capability is not 2 */ /* some UEs reject the call with 488 if mode-change-capability is not 2 */
fmtptmp_pos += switch_snprintf(fmtptmp + fmtptmp_pos, sizeof(fmtptmp) - fmtptmp_pos, ";octet-align=%d;max-red=0;mode-change-capability=2", switch_snprintf(fmtptmp + fmtptmp_pos, sizeof(fmtptmp) - fmtptmp_pos, ";octet-align=%d;max-red=0;mode-change-capability=2",
switch_test_flag(context, AMR_OPT_OCTET_ALIGN) ? 1 : 0); switch_test_flag(context, AMR_OPT_OCTET_ALIGN) ? 1 : 0);
} }
codec->fmtp_out = switch_core_strdup(codec->memory_pool, fmtptmp); codec->fmtp_out = switch_core_strdup(codec->memory_pool, fmtptmp);