multiqueue: avoid signaling overrun on the first segment
authorThiago Santos <ts.santos@sisa.samsung.com>
Mon, 28 Apr 2014 16:02:11 +0000 (13:02 -0300)
committerThiago Santos <ts.santos@sisa.samsung.com>
Mon, 28 Apr 2014 20:08:57 +0000 (17:08 -0300)
commit0a3bc6be1fc09a8aabde43505f9c3f0dfaf2ed94
tree0d728f60fdbcb788983df29c9812efa8ad8f13fe
parent3b617f1fb22fd5d6bc14e79a2925ad149d2e350c
multiqueue: avoid signaling overrun on the first segment

When the first segment has position != 0 and position > max-size-time
it will immediatelly cause the multiqueue to signal overrun.

This can happen easily with adaptive streams when switching bitrates
and starting a new group. The segment for this new group will have
a position that is much greater than 0 and will lead to this issue.
This is particularly harmful when the adaptive stream uses mpegts
that doesn't emit no-more-pads and it might happen that only one
of the stream pads was added when the multiqueue overruns and gets
the group ready for exposing. So the user will only get audio or
video.

The solution is to fallback to the sink segment while the source pad
has no segment.

https://bugzilla.gnome.org/show_bug.cgi?id=729124
plugins/elements/gstmultiqueue.c