summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@igalia.com>2019-01-30 22:16:39 -0300
committerMathieu Duponchelle <mduponchelle1@gmail.com>2019-01-31 01:20:13 +0000
commit3324ad377d0d80d06e9120fe3d8c5020fc4597c2 (patch)
tree8e4e16e159185234209773b5f04cb71ad2cf5cf7
parenta00e917811e2db8bebe093160d19cbffd2c78b10 (diff)
testbin: Do not take FlowCombiner into account when flushing
The way FlowCombiner combines the FLUSH doesn't work in the case we have several "sinkpads" since any flush return FLUSH. But in the case we have a seek where on one branch flush is done, we should just say OK otherwise we might return FLUSHING to a src that has already been seeked and is ready to process new buffers
-rw-r--r--gst/debugutils/gsttestsrcbin.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gst/debugutils/gsttestsrcbin.c b/gst/debugutils/gsttestsrcbin.c
index aedc818ec..f5901f8f7 100644
--- a/gst/debugutils/gsttestsrcbin.c
+++ b/gst/debugutils/gsttestsrcbin.c
@@ -171,14 +171,17 @@ src_pad_probe_cb (GstPad * pad, GstPadProbeInfo * info, ProbeData * data)
static GstFlowReturn
gst_test_src_bin_chain (GstPad * pad, GstObject * object, GstBuffer * buffer)
{
- GstFlowReturn res;
+ GstFlowReturn res, chain_res;
GstTestSrcBin *self = GST_TEST_SRC_BIN (gst_object_get_parent (object));
- res = gst_flow_combiner_update_pad_flow (self->flow_combiner, pad,
- gst_proxy_pad_chain_default (pad, GST_OBJECT (self), buffer));
+ chain_res = gst_proxy_pad_chain_default (pad, GST_OBJECT (self), buffer);
+ res = gst_flow_combiner_update_pad_flow (self->flow_combiner, pad, chain_res);
gst_object_unref (self);
+ if (res == GST_FLOW_FLUSHING)
+ return chain_res;
+
return res;
}