From f40e3c0653a90aea7de324a8ef18cf4df81a8e15 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Sun, 5 Mar 2023 08:54:54 -0500 Subject: [PATCH] MT#56782 pass format to format answer Make it possible to make our fmtp= answer string based on the input audio format. Change-Id: I042561c3d4e7056624e1fd9ad2a20d6ddf116da2 --- daemon/codec.c | 2 +- lib/codeclib.c | 2 +- lib/codeclib.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/codec.c b/daemon/codec.c index 383c81c9c..1b39d2fa0 100644 --- a/daemon/codec.c +++ b/daemon/codec.c @@ -446,7 +446,7 @@ reset: rtp_payload_type_copy(&handler->dest_pt, dest); if (dest->codec_def->format_answer) - dest->codec_def->format_answer(&handler->dest_pt); + dest->codec_def->format_answer(&handler->dest_pt, &handler->source_pt); handler->handler_func = handler_func_transcode; handler->packet_decoded = packet_decoded; handler->transcoder = 1; diff --git a/lib/codeclib.c b/lib/codeclib.c index 3d54aad0c..7845091dc 100644 --- a/lib/codeclib.c +++ b/lib/codeclib.c @@ -3490,7 +3490,7 @@ static int evs_format_parse(struct rtp_codec_format *f, const str *fmtp) { codeclib_key_value_parse(fmtp, true, evs_parse_format_cb, &f->parsed); return 0; } -static void evs_format_answer(struct rtp_payload_type *p) { +static void evs_format_answer(struct rtp_payload_type *p, const struct rtp_payload_type *src) { if (!p->format.fmtp_parsed) return; diff --git a/lib/codeclib.h b/lib/codeclib.h index 06e099ce7..428bfcf3c 100644 --- a/lib/codeclib.h +++ b/lib/codeclib.h @@ -91,7 +91,7 @@ typedef void select_encoder_format_f(encoder_t *, format_t *requested_format, co typedef void select_decoder_format_f(decoder_t *); typedef int format_parse_f(struct rtp_codec_format *, const str *fmtp); -typedef void format_answer_f(struct rtp_payload_type *); +typedef void format_answer_f(struct rtp_payload_type *, const struct rtp_payload_type *);