TT#109800 fix mismatched CN generator format

Upsample output of DTX CN generator to match the format of the parent
codec.

Change-Id: Ic2de29a6b711a5258af25e8ec98decaf218d2ada
pull/1457/head
Richard Fuchs 4 years ago
parent e59c062108
commit 97e8c1d990

@ -2376,7 +2376,11 @@ static int generic_cn_dtx(decoder_t *dec, GQueue *out, int ptime) {
}
static int generic_cn_dtx_init(decoder_t *dec) {
dec->dtx.u.cn.cn_dec = decoder_new_fmt(codec_def_cn, 8000, 1, dec->ptime, &dec->dest_format);
// upsample CN output to same params as output of parent codec
format_t cn_format = dec->dest_format;
cn_format.channels = dec->in_format.channels;
cn_format.clockrate = dec->in_format.clockrate;
dec->dtx.u.cn.cn_dec = decoder_new_fmt(codec_def_cn, 8000, 1, dec->ptime, &cn_format);
return 0;
}

Loading…
Cancel
Save