gstaudiobasesrc: skew handling if we are ahead of ringbuffer missing
In our pipeline ( "audio hw" -> alsasrc -> .. -> udpsink ) we are taking samples from the audio interface and transmitting them using RTP.
The audio codec clock and pipeline clock are not derived from the same clock and thus have a differing view on the sample rate.
This introduces skew and if the skew is positive i.e. the audio codec is running slower than the pipeline clock it works as expected. If the codec clock is running slightly faster than the pipeline clock, buffers start accumulating in the pipeline and after a while no audio is rendered.
We are using the default slave method "GST_AUDIO_BASE_SRC_SLAVE_SKEW". When looking at the code we can see that the case where segment_skew is positive is handled (segment_skew >= ringbuffer->spec.segtotal) but not the case where the segment_skew is negative.
Should this be addressed or is there another way to handle this case in the pipeline?