Skip to content

Commit

Permalink
media_socket.c: check for NULL payload_types passed to kernelize_one
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
Peter Pulham authored and tombriden committed Nov 1, 2024
1 parent eb9d4ed commit 906fdc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion daemon/media_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 906fdc5

Please sign in to comment.