'gstreamer pipeline sendEOS deadlock

I have a java app that uses gstreamer to process some audio. My pipeline is:

udpsrc name=side1 address="loadtest3.pslab.corp" retrieve-sender-address=false reuse=false port=17840 caps="application/x-rtp, media=(string)audio, payload=0, clock-rate=(int)8000" timeout=10000000000 ! rtppcmudepay ! rtppcmupay min-ptime=1000000000 max-ptime=1000000000 mtu=10012 ! rtppcmudepay ! mulawdec ! interleave name=mix ! mulawenc ! appsink name=appsink wait-on-eos=false emit-signals=true sync=false async=false udpsrc name=side2 address="loadtest3.pslab.corp" retrieve-sender-address=false reuse=false port=17842 caps="application/x-rtp, media=(string)audio, payload=0, clock-rate=(int)8000" ! rtppcmudepay ! rtppcmupay min-ptime=1000000000 max-ptime=1000000000 mtu=10012 ! rtppcmudepay ! mulawdec ! mix.

I do have over 200 pipelines running in parrallel and when the code sens an EOS in PLAYING state some of the pipelines are getting deadlocked into the sendEOS request. For example, from 1693 pipelines executed I do get 67 that end-up in that deadlock.

See image. I would like to understand why this happens & how can I avoid it. I have added wait-on-eos on the appsink to false, but the behaviour remains the same.

Any ideas ?!? Thx.

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source