aggregator: send flush_stop ourselves if needed
authorMathieu Duponchelle <mathieu@centricular.com>
Tue, 11 Jun 2019 13:20:18 +0000 (15:20 +0200)
committerMathieu Duponchelle <mathieu@centricular.com>
Tue, 11 Jun 2019 13:20:18 +0000 (15:20 +0200)
In !159 , we switched to sending flush_start ourselves from the
do_seek implementation. If no flushing seek successfully made its
way upstream, we need to send flush_stop ourselves as well.

libs/gst/base/gstaggregator.c

index 98dbb14..32f64e9 100644 (file)
@@ -2051,6 +2051,14 @@ gst_aggregator_do_seek (GstAggregator * self, GstEvent * event)
     GST_OBJECT_LOCK (self);
     priv->flushing = FALSE;
     GST_OBJECT_UNLOCK (self);
+
+    /* No flush stop is inbound for us to forward */
+    if (flush) {
+      GstEvent *event = gst_event_new_flush_stop (TRUE);
+
+      gst_event_set_seqnum (event, self->priv->next_seqnum);
+      gst_pad_push_event (self->srcpad, event);
+    }
   }
 
   GST_INFO_OBJECT (self, "seek done, result: %d", evdata.result);