aggregator: set future seqnum before propagating the seek event.
authorMathieu Duponchelle <mathieu.duponchelle@opencreed.com>
Thu, 17 Jul 2014 23:41:26 +0000 (01:41 +0200)
committerThibault Saunier <tsaunier@gnome.org>
Mon, 6 Oct 2014 16:57:28 +0000 (18:57 +0200)
So the seqnum is properly set for the following events.

gst-libs/gst/base/gstaggregator.c

index 6981aa684e169257f70b3cdeba38ff39cfb0ce13..13534b1c90741f12d0f7992367bdaecb651abdc3 100644 (file)
@@ -1014,10 +1014,12 @@ _src_event (GstAggregator * self, GstEvent * event)
   switch (GST_EVENT_TYPE (event)) {
     case GST_EVENT_SEEK:
     {
+      gint old_seqnum = self->priv->seqnum;
+      self->priv->seqnum = gst_event_get_seqnum (event);
       gst_event_ref (event);
       res = _do_seek (self, event);
-      if (res)
-        self->priv->seqnum = gst_event_get_seqnum (event);
+      if (!res)
+        self->priv->seqnum = old_seqnum;
       gst_event_unref (event);
       event = NULL;
       goto done;