Skip to content

sctpenc: Fix potential shutdown deadlock

Johan Sternerup requested to merge johast/gstreamer:sctpenc_flush_sinkpads into main

When transitioning from state PAUSED to READY, the sctpenc element could previously be stuck in an endless loop trying to resend data in case the underlying sctp stream was in the process of resetting. usrsctp_sendv() would repeatedly return EAGAIN with the result that 0 bytes were sent and then sctpenc would retry forever.

To bring sctpenc out of the resend loop we just need to inform the sink pad that it is flushing, which is already done for the associated data queue queue, but we also need to set the bools associated with the sinkpads that are used as the loop criterion.

Merge request reports