Skip to content

modules: rtp-gstreamer: Fix RTP sound lag

In the current scenario of reading samples from the appsink, it is observed that we do not actually read all the data available in the appsink to read. This results in a choppy sound or heard as gaps in the playback.

The underlying reason for this happening is as follows. Let's say the appsink new sample callback is called 2-3 times, but, with the underlying fdsem post machinery when pa_rtp_recv eventually gets called, there would be those 2-3 samples to read. However, we were only reading one sample in the current implementation.

Fix this by reading all samples from the appsink in a loop, coalescing them and then writing to the memchunk.

Fixes: #889 (closed)

Signed-off-by: Sanchayan Maity sanchayan@asymptotic.io

Merge request reports