input-selector: Fix waiting on EOS

This apparently got broken by bc1ec4e. Since self->blocked is always
FALSE, gst_input_selector_wait never actually waits.

Using (!self->eos || self->blocked) && ... as the loop condition would
be incorrect as well, because then the other call to the function in
_chain would block until EOS, so the functions cannot be merged trivially.

Since blocking is obsolete, gst_input_selector_wait will get removed anyway.
As such, just inline the loop.

https://bugzilla.gnome.org/show_bug.cgi?id=746518
This commit is contained in:
Jan Alexander Steffens (heftig) 2015-03-23 13:05:30 +01:00 committed by Thiago Santos
parent 150e8a5c97
commit ce663311e1

View file

@ -535,9 +535,10 @@ gst_selector_pad_event (GstPad * pad, GstObject * parent, GstEvent * event)
selpad->eos = TRUE;
if (!forward) {
/* blocked until active the sind pad or flush */
gst_input_selector_wait (sel, selpad);
forward = TRUE;
/* Wait until we're the active sink pad or we're flushing */
while (!sel->eos && !sel->flushing && !selpad->flushing)
GST_INPUT_SELECTOR_WAIT (sel);
} else {
/* Notify all waiting pads about going EOS now */
sel->eos = TRUE;