inputselector: Only wait until the active pad's running time is reached if the active pad already saw data

Otherwise we might block forever because upstream (e.g. multiqueue) is waiting
for the previously active stream to return forever (which is waiting here
in inputselector) before pushing something on the newly selected stream.
This commit is contained in:
Sebastian Dröge 2012-03-29 13:39:40 +02:00
parent 37db4eefbf
commit d03e3d7772

View file

@ -683,9 +683,10 @@ gst_input_selector_wait_running_time (GstInputSelector * sel,
* d) the active pad has no running time or the active
* pad's running time is before this running time
* e) the active pad has a non-time segment
* f) the active pad changed and has not pushed anything
*/
while (pad != active_selpad && !sel->flushing && !pad->flushing &&
(sel->blocked || active_running_time == -1
while (pad != active_selpad && !sel->flushing && !pad->flushing
&& active_selpad->pushed && (sel->blocked || active_running_time == -1
|| running_time >= active_running_time)) {
if (!sel->blocked)
GST_DEBUG_OBJECT (pad,