raop: avoid division by 0

This commit is contained in:
Wim Taymans 2026-05-04 12:26:08 +02:00
parent 2993bf1722
commit a4d7607a88

View file

@ -1903,7 +1903,7 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
copy_props(impl, props, "sess.ts-direct");
impl->mtu = SPA_MIN(pw_properties_get_uint32(impl->props, "net.mtu", 1448), 9000u);
impl->sync_period = impl->rate / (impl->mtu / impl->stride);
impl->sync_period = impl->rate * impl->stride / impl->mtu;
impl->core = pw_context_get_object(impl->context, PW_TYPE_INTERFACE_Core);
if (impl->core == NULL) {
str = pw_properties_get(props, PW_KEY_REMOTE_NAME);