splitmuxsink: Make sure flushing doesn't block
authorJan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
Fri, 31 Jul 2020 11:50:13 +0000 (13:50 +0200)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 4 Aug 2020 15:15:27 +0000 (15:15 +0000)
commit28a616f6933f11cab372cf4e1bb143b99c89bd0c
treee7d45610c6cf6d2ca93be8bbc4cf8b0f0c9365f2
parentaf9e66d7a575d8bb8c2f9dc12660c989eebe2032
splitmuxsink: Make sure flushing doesn't block

* Trying to disconnect a stream from a running splitmuxsink by flushing
  it results in the FLUSH_START blocking in the stream queue's
  gst_pad_pause_task because the flush did not unblock
  complete_or_wait_on_out, so add a check for ctx->flushing there.

* Add a GST_SPLITMUX_BROADCAST_INPUT so check_completed_gop notices
  flushing changed and the incoming push is unblocked.

* Pass the FLUSH_STOP along to the muxer without waiting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/687>
gst/multifile/gstsplitmuxsink.c