From e59ee48a06b1c85a678bef1cc9fedc814d1298cd Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 31 Mar 2026 10:07:41 -0400 Subject: [PATCH] MT#55283 update unsubscribed subs as well Change-Id: I9d4e0c06186d97a8bf34ca8103ac2b628109d796 --- daemon/call.c | 1 + daemon/codec.c | 7 +++++++ include/codec.h | 3 +++ 3 files changed, 11 insertions(+) diff --git a/daemon/call.c b/daemon/call.c index a01696846..2258c9268 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -4873,6 +4873,7 @@ void dialogue_connect(struct call_monologue *src_ml, struct call_monologue *dst_ __subscribe_medias_both_ways(src_media, dst_media, false, &medias); __medias_unconfirm(&medias, "connect"); + codec_update_medias_handlers(&medias); media_set_audio_player(dst_media, flags); diff --git a/daemon/codec.c b/daemon/codec.c index afb13731e..66ee8e010 100644 --- a/daemon/codec.c +++ b/daemon/codec.c @@ -4964,6 +4964,13 @@ void __codec_update_all_source_handlers(struct call_monologue *ml, struct chu_ar } } +void codec_update_medias_handlers(const medias_q *medias) { + for (auto_iter(l, medias->head); l; l = l->next) { + codec_update_media_source_handlers(l->data); + codec_update_media_handlers(l->data); + } +} + void codec_calc_jitter(struct ssrc_entry_call *ssrc, unsigned long ts, unsigned int clockrate, int64_t tv) { if (!ssrc || !clockrate) diff --git a/include/codec.h b/include/codec.h index 15b17c4a4..001c813c4 100644 --- a/include/codec.h +++ b/include/codec.h @@ -251,6 +251,9 @@ void __codec_update_all_source_handlers(struct call_monologue *ml, struct chu_ar #define codec_update_all_source_handlers(r, ...) \ __codec_update_all_source_handlers(r, (struct chu_args) {__VA_ARGS__}) +__attribute__((nonnull(1))) +void codec_update_medias_handlers(const medias_q *); + bool codec_handler_transform(struct call_media *r, ng_codecs_q *); #ifdef WITH_TRANSCODING