From e963d855dd77ce11d2e8ffd98f728826bb68db58 Mon Sep 17 00:00:00 2001 From: Kieran Kunhya Date: Tue, 16 Jan 2024 13:04:12 +0000 Subject: [PATCH] examples: Support source filtering in srt listener mode --- examples/rist_rx.c | 2 +- examples/rist_tx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/rist_rx.c b/examples/rist_rx.c index 430b2d746..bd0c05e43 100644 --- a/examples/rist_rx.c +++ b/examples/rist_rx.c @@ -201,7 +201,7 @@ static void addr_to_str(const struct sockaddr *s, char uri[INET6_ADDRSTRLEN+6]) static int start(void) { - bool listener = srcpath && *srcpath == '@'; + bool listener = srcpath && strchr(srcpath, '@'); struct upipe_mgr *upipe_udpsrc_mgr = upipe_udpsrc_mgr_alloc(); upipe_udpsrc = upipe_void_alloc(upipe_udpsrc_mgr, &uprobe_udp); upipe_mgr_release(upipe_udpsrc_mgr); diff --git a/examples/rist_tx.c b/examples/rist_tx.c index 843900f98..f431a1578 100644 --- a/examples/rist_tx.c +++ b/examples/rist_tx.c @@ -181,7 +181,7 @@ static int start(void) static unsigned z = 0; z++; - bool listener = dirpath && *dirpath == '@'; + bool listener = dirpath && strchr(dirpath, '@'); /* rtp source */ struct upipe_mgr *upipe_udpsrc_mgr = upipe_udpsrc_mgr_alloc();