From 2954eb24acedbf73c21b799954fa0f31a3f6a0ce Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 11 Sep 2025 08:22:21 -0400 Subject: [PATCH] MT#55283 carry over PT flags with reuse Change-Id: I19a4ae523f372be825c0814c29b005fd961cbc76 (cherry picked from commit 176a834500b679be16d7ce18f1c120ce183d8326) --- daemon/codec.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/daemon/codec.c b/daemon/codec.c index d349ec961..460a22674 100644 --- a/daemon/codec.c +++ b/daemon/codec.c @@ -5556,10 +5556,16 @@ void __codec_store_populate_reuse(struct codec_store *dst, struct codec_store *s STR_FMT(&pt->encoding_with_params), STR_FMT0(&pt->format_parameters), pt->payload_type); + // replace existing entry with new one in same position, // in case options have changed + // but carry over flags + __auto_type dup = rtp_payload_type_dup(pt); + dup->for_transcoding = orig_pt->for_transcoding; + dup->accepted = orig_pt->accepted; + __auto_type pos = __codec_store_delete_link(orig_pt->prefs_link, dst); - codec_store_add_raw_link(dst, rtp_payload_type_dup(pt), pos); + codec_store_add_raw_link(dst, dup, pos); } else { if (!a.answer_only) {