module-rtp: clear ringbuffer in resync

When we resync to the timestamp, clear the ringbuffer to avoid playing
old stale samples.
This commit is contained in:
Wim Taymans 2023-02-15 11:08:08 +01:00
parent aa3b776f6f
commit 965b220206

View file

@ -435,6 +435,7 @@ on_rtp_io(void *data, int fd, uint32_t mask)
spa_dll_init(&sess->dll); spa_dll_init(&sess->dll);
spa_dll_set_bw(&sess->dll, SPA_DLL_BW_MIN, 128, sess->info.info.rate); spa_dll_set_bw(&sess->dll, SPA_DLL_BW_MIN, 128, sess->info.info.rate);
memset(sess->buffer, 0, BUFFER_SIZE);
sess->have_sync = true; sess->have_sync = true;
} else if (expected_timestamp != timestamp) { } else if (expected_timestamp != timestamp) {
pw_log_debug("unexpected timestamp (%u != %u)", pw_log_debug("unexpected timestamp (%u != %u)",