The challenge was to stream FLAC audio using gstrtppay/depay and correctly track caps changes.
The test setup was like this:
gst-launch udpsrc ! application/x-rtp,media=application,encoding-name=X-GST,clock-rate=90000,payload=96 !
rtpgstdepay ! flacdec ! autoaudiosink
Encoder 1: gst-launch audiotestsrc ! audio/x-raw,channels=2,rate=48000 ! flacenc ! rtpgstpay config-interal=1 ! udpsink
Encoder 2: gst-launch audiotestsrc ! audio/x-raw,channels=6,rate=48000 ! flacenc ! rtpgstpay config-interal=1 ! udpsink
Decoder is started before or after Encoder 1 has been started, after Decoder started decoding Encoder 1 is stopped and Encoder 2 is started while the decoder remains running.
This does not work without the patches from this branch.
In my opinion the patches for rtpgstdepay are generic and needed for other streaming setup with changing source stream caps as well.