diff options
author | Mathieu Duponchelle <mduponchelle1@gmail.com> | 2014-02-19 02:27:36 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-03-16 18:15:17 +0100 |
commit | d784d59262ebe93d0f7109a5bc2bc59d0f185067 (patch) | |
tree | 8d43a3988d9dc4ed83ff69bd38f4b2f25da85f53 | |
parent | 595481c75903e8efdffbcc26a99b5743438b9a66 (diff) |
collectpads: When seek flushed, immediately set eospads to 0
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
-rw-r--r-- | libs/gst/base/gstcollectpads.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/gst/base/gstcollectpads.c b/libs/gst/base/gstcollectpads.c index 669ac4c4d..72c539fdb 100644 --- a/libs/gst/base/gstcollectpads.c +++ b/libs/gst/base/gstcollectpads.c @@ -1734,7 +1734,9 @@ gst_collect_pads_event_default (GstCollectPads * pads, GstCollectData * data, 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); @@ -1912,6 +1914,8 @@ gst_collect_pads_src_event_default (GstCollectPads * pads, GstPad * pad, 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); |