diff --git a/src/modules/module-raop-sink.c b/src/modules/module-raop-sink.c index 076c388d7..ef74d42e6 100644 --- a/src/modules/module-raop-sink.c +++ b/src/modules/module-raop-sink.c @@ -911,7 +911,6 @@ static int rtsp_record_reply(void *data, int status, const struct spa_dict *head rtp_stream_set_first(impl->stream); impl->sync = 0; - impl->sync_period = impl->rate / (impl->mtu / impl->stride); impl->recording = true; rtsp_send_volume(impl); @@ -1916,8 +1915,6 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args) impl->rate = RAOP_RATE; impl->latency = msec_to_samples(impl, RAOP_LATENCY_MS); impl->stride = RAOP_STRIDE; - impl->mtu = impl->stride * impl->psamples; - impl->sync_period = impl->rate / impl->psamples; if ((str = pw_properties_get(props, "raop.latency.ms")) == NULL) str = SPA_STRINGIFY(DEFAULT_LATENCY_MS); @@ -1946,7 +1943,7 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args) if (pw_properties_get(props, PW_KEY_MEDIA_FORMAT) == NULL) pw_properties_setf(props, PW_KEY_MEDIA_FORMAT, "%d", SPA_AUDIO_FORMAT_S16_LE); if (pw_properties_get(props, "net.mtu") == NULL) - pw_properties_setf(props, "net.mtu", "%d", impl->mtu); + pw_properties_set(props, "net.mtu", "1448"); if (pw_properties_get(props, "rtp.sender-ts-offset") == NULL) pw_properties_setf(props, "rtp.sender-ts-offset", "%d", 0); if (pw_properties_get(props, "sess.ts-direct") == NULL) @@ -1982,6 +1979,8 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args) copy_props(impl, props, "sess.ts-refclk"); copy_props(impl, props, "sess.ts-direct"); + impl->mtu = pw_properties_get_uint32(impl->props, "net.mtu", 1448); + impl->sync_period = impl->rate / (impl->mtu / impl->stride); 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);