Commit 6f6ca875 authored by Simon Morlat's avatar Simon Morlat

CN packets shall be sent only if choosed codec has no VAD/DTX capabilities.

Since VAD/DTX capabilities are not signaled, the signaling of PLC capability is used as an approximation.
parent f335883e
......@@ -1065,14 +1065,13 @@ int audio_stream_start_from_io(AudioStream *stream, RtpProfile *profile, const c
}
if (decoder_have_plc == 0) {
stream->plc = ms_filter_new(MS_GENERIC_PLC_ID);
if (stream->plc) {
ms_filter_call_method(stream->plc, MS_FILTER_SET_NCHANNELS, &nchannels);
ms_filter_call_method(stream->plc, MS_FILTER_SET_SAMPLE_RATE, &sample_rate);
/*as first rough approximation, a codec without PLC capabilities has no VAD/DTX builtin, thus setup generic confort noise if possible*/
setup_generic_confort_noise(stream);
}
}
if (stream->plc) {
ms_filter_call_method(stream->plc, MS_FILTER_SET_NCHANNELS, &nchannels);
ms_filter_call_method(stream->plc, MS_FILTER_SET_SAMPLE_RATE, &sample_rate);
}
/*as first rough approximation, a codec without PLC capabilities has no VAD/DTX builtin, thus setup generic confort noise if possible*/
setup_generic_confort_noise(stream);
} else {
stream->plc = NULL;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment