Skip to content

threadshare: fix latency query handlers

Returning 0 as the max latency in those sources is incorrect, and may lead to sinks incorrectly complaining about insufficient buffering elements.

Reproduce with:

gst-launch-1.0 ts-udpsrc port=50000 address=127.0.0.1
caps="application/x-rtp, media=(string)audio, clock-rate=(int)8000, encoding-name=(string)PCMA, payload=(int)8" !
rtppcmadepay ! alawdec ! autoaudiosink

gst-launch-1.0 audiotestsrc do-timestamp=true samplesperbuffer=400 !
alawenc ! rtppcmapay max-ptime=50000000 min-ptime=50000000 !
udpsink host=127.0.0.1 port=50000

Logs:

Not enough buffering available for the processing deadline of 0:00:00.020000000, add enough queues to buffer 0:00:00.020000000 additional data. Shortening processing latency to 0:00:00.000000000.

This then causes glitches, there are many other ways for the problems to manifest.

Merge request reports

Loading