aggregator: Invalidate pad's tail position ...
authorMathieu Duponchelle <mathieu.duponchelle@opencreed.com>
Thu, 13 Apr 2017 20:11:55 +0000 (22:11 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 2 Dec 2017 15:10:27 +0000 (15:10 +0000)
when dequeuing a segment event.

https://bugzilla.gnome.org/show_bug.cgi?id=784593

libs/gst/base/gstaggregator.c

index 3a2daf8..315b8b8 100644 (file)
@@ -1430,6 +1430,10 @@ gst_aggregator_default_sink_event (GstAggregator * self,
       PAD_LOCK (aggpad);
       GST_OBJECT_LOCK (aggpad);
       gst_event_copy_segment (event, &aggpad->segment);
+      /* We've got a new segment, tail_position is now meaningless
+       * and may interfere with the time_level calculation
+       */
+      aggpad->priv->tail_position = GST_CLOCK_TIME_NONE;
       update_time_level (aggpad, FALSE);
       GST_OBJECT_UNLOCK (aggpad);
       PAD_UNLOCK (aggpad);