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));