collectpads2: avoid hanging in case of sparse newsegment events

... in the extent that a non-waiting pad (so indicated by newsegment)
turns out to provide the best buffer, which is then forced to waiting
for book-keeping purposes, but that should only be temporary.

See bug #415754.
This commit is contained in:
Mark Nauwelaerts 2011-09-27 15:48:52 +02:00 committed by Sebastian Dröge
parent 2a13275985
commit ce88f417b1

View file

@ -1544,6 +1544,11 @@ gst_collect_pads2_default_collected (GstCollectPads2 * pads, gpointer user_data)
buffer = gst_collect_pads2_pop (pads, best);
ret = func (pads, best, buffer, buffer_user_data);
/* maybe non-waiting was forced to waiting above due to
* newsegment events coming too sparsely,
* so re-check to restore state to avoid hanging/waiting */
gst_collect_pads2_recalculate_full (pads);
done:
return ret;
}