concat: Handle single-pad use-cases
authorEdward Hervey <bilboed@bilboed.com>
Fri, 10 Nov 2017 13:10:31 +0000 (14:10 +0100)
committerEdward Hervey <bilboed@bilboed.com>
Fri, 10 Nov 2017 13:15:46 +0000 (14:15 +0100)
commitf03443f90c6d5d143861f5e75990d06b700a5895
tree6c1cafcc88c84ac8ca7a453214245248d4e5cb8c
parent08ad748cedf36fc4884c56afcb43922fdadf78f5
concat: Handle single-pad use-cases

When EOS reaches concat, it will switch to the next candidate as its
activate pad.

The problem arises when there is only one sinkpad, the "active" pad
becomes NULL. This results in concat becoming unusable after it receives
a *single* EOS on its single sinkpad.

If we detect there is a single sinkpad and there is no current active pad:
* If we are waiting (from selected sink event/buffer), become the current
  active pad.
* If there is a seek request, send it upstream. We don't switch the
  active_sinkpad property at that point in time, since the seek could
  fail. If the seek succeeds, the following SEGMENT (or STREAM_START)
  will cause the pad_wait() to elect that pad as the new active one.
* Flush events get forwarded

https://bugzilla.gnome.org/show_bug.cgi?id=790167
plugins/elements/gstconcat.c