This prevents situations where a first branch would get seeked and
receive a buffer before all branches got seeked, and thus collected
would get called based on EOS from the previous segment.
As a consequence, during the process of seeking, don't decrease
the eospads number when a FLUSH_STOP is received.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=724571
if (!GST_COLLECT_PADS_STATE_IS_SET (data,
GST_COLLECT_PADS_STATE_WAITING))
pads->priv->queuedpads++;
- pads->priv->eospads--;
+ if (!g_atomic_int_get (&pads->priv->seeking)) {
+ pads->priv->eospads--;
+ }
GST_COLLECT_PADS_STATE_UNSET (data, GST_COLLECT_PADS_STATE_EOS);
}
GST_COLLECT_PADS_STREAM_UNLOCK (pads);
case GST_EVENT_SEEK:{
GstSeekFlags flags;
+ pads->priv->eospads = 0;
+
GST_INFO_OBJECT (pads, "starting seek");
gst_event_parse_seek (event, NULL, NULL, &flags, NULL, NULL, NULL, NULL);