baseparse: Also flush the close_segment
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 5 Mar 2012 13:25:57 +0000 (14:25 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 5 Mar 2012 13:37:57 +0000 (14:37 +0100)
Pushing this after flushing will confuse downstream.

libs/gst/base/gstbaseparse.c

index 9598649..bcb2a9a 100644 (file)
@@ -465,9 +465,10 @@ gst_base_parse_clear_queues (GstBaseParse * parse)
 
   g_list_foreach (parse->priv->pending_events, (GFunc) gst_event_unref, NULL);
   g_list_free (parse->priv->pending_events);
 
   g_list_foreach (parse->priv->pending_events, (GFunc) gst_event_unref, NULL);
   g_list_free (parse->priv->pending_events);
-  parse->priv->pending_seeks = NULL;
+  parse->priv->pending_events = NULL;
 
   gst_event_replace (&parse->priv->pending_segment, NULL);
 
   gst_event_replace (&parse->priv->pending_segment, NULL);
+  gst_event_replace (&parse->priv->close_segment, NULL);
 }
 
 static void
 }
 
 static void
@@ -775,6 +776,8 @@ gst_base_parse_reset (GstBaseParse * parse)
   g_list_free (parse->priv->pending_events);
   parse->priv->pending_events = NULL;
 
   g_list_free (parse->priv->pending_events);
   parse->priv->pending_events = NULL;
 
+  gst_event_replace (&parse->priv->close_segment, NULL);
+
   if (parse->priv->cache) {
     gst_buffer_unref (parse->priv->cache);
     parse->priv->cache = NULL;
   if (parse->priv->cache) {
     gst_buffer_unref (parse->priv->cache);
     parse->priv->cache = NULL;