diff --git a/daemon/call.c b/daemon/call.c index dd7717d26..72f7ca5b0 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -2530,6 +2530,7 @@ static void codecs_offer(struct call_media *media, struct call_media *other_medi // keep a copy of the final list of what was offered codec_store_copy(&other_media->offered_codecs, &other_media->codecs); + codec_store_copy(&media->offered_codecs, &media->codecs); } __attribute__((nonnull(1, 2, 3, 4))) @@ -2540,6 +2541,9 @@ static void codecs_answer(struct call_media *media, struct call_media *other_med STR_FMT(&other_media->monologue->tag), other_media->index); + // reset to codecs that were offered + codec_store_copy(&other_media->codecs, &other_media->offered_codecs); + const struct codec_store *answer_cs = &media->offered_codecs; // don't do codec answer for a rejected media section if (other_media->streams.length == 0)