From 9ca9579978635c1b2b41e70332b8910459a5f292 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Tue, 28 Jan 2025 10:59:48 -0500 Subject: [PATCH] rtp: Initialise source receiving state to true be default Because we don't know the stream state at the start of streaming, if clients are deciding to connect on the basis of this flag, they will never connect if we default to true. So let's be optimistic by default and we'll find out on timeout if there actually isn't data to receive. --- src/modules/module-rtp-source.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/module-rtp-source.c b/src/modules/module-rtp-source.c index f9a3f3345..98a26065a 100644 --- a/src/modules/module-rtp-source.c +++ b/src/modules/module-rtp-source.c @@ -661,7 +661,9 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args) "stream.may-pause", false); impl->standby = false; impl->waiting = true; - pw_properties_set(stream_props, "rtp.receiving", "false"); + /* Because we don't know the stream receiving state at the start, we try to fake it + * till we make it (or get timed out) */ + pw_properties_set(stream_props, "rtp.receiving", "true"); impl->cleanup_interval = pw_properties_get_uint32(props, "cleanup.sec", DEFAULT_CLEANUP_SEC);