From 8e04c44b867bb3b6967c2df471e5204ec37d4784 Mon Sep 17 00:00:00 2001 From: Peter Pulham Date: Tue, 28 May 2024 15:08:00 +0100 Subject: [PATCH] MT#55283 media_socket.c: check for NULL payload_types passed to kernelize_one under normal circumstances, the rtp sink enters this function first and updates the reti->local.family var to AF_INET so that when the function is called for an rtcp sink, it exits the function early. However, if media is being blocked the rtcp sink is the first to enter the function and does so with a NULL payload type. this NULL check is therefore required to prevent a sefgault on the call to `assert`. closes #1876 Change-Id: Id95cbbc9ae388f50dd51417c351f4a9ba09eb5f0 --- daemon/media_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/media_socket.c b/daemon/media_socket.c index 6a7904cf1..91409ad3b 100644 --- a/daemon/media_socket.c +++ b/daemon/media_socket.c @@ -1521,7 +1521,7 @@ static const char *kernelize_one(struct rtpengine_target_info *reti, GQueue *out } } - if (reti->rtp && sinks && sinks->length) { + if (reti->rtp && sinks && sinks->length && payload_types) { GList *l; struct rtp_stats *rs;