Improved codecs info fix

This commit is contained in:
Juha Heinanen
2026-02-15 04:01:56 +02:00
parent 3cb05262a1
commit 0058f778cc
2 changed files with 5 additions and 10 deletions

View File

@ -1457,9 +1457,9 @@ JNIEXPORT jstring JNICALL Java_com_tutpro_baresip_Api_call_1audio_1codecs(
if (tx && rx)
len = re_snprintf(start, left, "%s/%u/%u,%s/%u/%u", tx->name, tx->srate, tx->ch, rx->name,
rx->srate, rx->ch);
if (len == -1) {
else {
LOGE("failed to get audio codecs of call %ld\n", (long)call);
codec_buf[0] = '\0';
len = re_snprintf(start, left, "%s/%u/%u,%s/%u/%u", '?', 0, 0, '?', 0, 0);
}
return (*env)->NewStringUTF(env, codec_buf);
}