gstsctpenc: Fix pausing the task when there is no data in the queue
gstsctpenc: Fix pausing the task when there is no data in the queue

This patch fixes problem introduced in commit [1]

Checking if the queue is empty makes the source pad task be paused
when there is neither a flush event in the pipeline nor data
available to be processed when the task had started, if data arrives
once the task is paused, associated buffers wont be pushed any more.

The deadlock detected in [1] was caused because when elements transite
to the state PAUSE they implicitly deactive pads, this involves pausing
the task associated to the source pad which was blocked waiting for data
in the queue.

This patch sets the queue to flushing in order to unblockthe the task
when the pad is deactived, this way the state transition can success
without any deadlocks

[1] https://github.com/EricssonResearch/openwebrtc-gst-plugins/commit/6cddc328e5baae8d75b7bb8d9ff7b4a5b15aadb1

EricssonResearch/openwebrtc-gst-plugins,EricssonResearch/openwebrtc-gst-plugins,EricssonResearch/openwebrtc-gst-plugins