From ac01a4746cc8c2fd449f6c1d764459445c30e8a7 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 7 Mar 2023 14:16:31 -0500 Subject: [PATCH] MT#56861 be more explicit with "inject DTMF" flag Instead of just setting the "force transcoding" flag when DTMF injection is required, check it on a per-codec basis, so we can be more granular with this decision. Functional no-op. Change-Id: I496f3d1fba5840e7870c373f94190243392db438 --- daemon/codec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/daemon/codec.c b/daemon/codec.c index 7dea824b9..cf2033fc9 100644 --- a/daemon/codec.c +++ b/daemon/codec.c @@ -1110,8 +1110,6 @@ bool codec_handlers_update(struct call_media *receiver, struct call_media *sink, // do we have to force everything through the transcoding engine even if codecs match? bool force_transcoding = do_pcm_dtmf_blocking || do_dtmf_blocking || use_audio_player; - if (sink->monologue->inject_dtmf) - force_transcoding = true; for (GList *l = receiver->codecs.codec_prefs.head; l; ) { struct rtp_payload_type *pt = l->data; @@ -1322,6 +1320,10 @@ sink_pt_fixed:; } } + // force transcoding if we want DTMF injection + if (sink->monologue->inject_dtmf) + goto transcode; + // everything matches - we can do passthrough ilogs(codec, LOG_DEBUG, "Sink supports codec " STR_FORMAT " for passthrough", STR_FMT(&pt->encoding_with_params));