From 619237c0d0dce7425cc3e5b9e34ee22219dcdd02 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 10 Jul 2014 13:18:21 +0200 Subject: [PATCH] aggregator: Flush sinkpads when stopping All values are meaningless in that case, so we should make sure that we clean everything --- gst-libs/gst/base/gstaggregator.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gst-libs/gst/base/gstaggregator.c b/gst-libs/gst/base/gstaggregator.c index c2d00adde9..7eab8063a0 100644 --- a/gst-libs/gst/base/gstaggregator.c +++ b/gst-libs/gst/base/gstaggregator.c @@ -690,11 +690,22 @@ eat: return res; } +static gboolean +_flush_pad (GstAggregator * self, GstAggregatorPad * pad, gpointer unused_udata) +{ + _aggpad_flush (pad, self); + + return TRUE; +} + static gboolean _stop (GstAggregator * agg) { _reset_flow_values (agg); + gst_aggregator_iterate_sinkpads (agg, + (GstAggregatorPadForeachFunc) _flush_pad, NULL); + return TRUE; }