Index: gst/mpegstream/gstdvddemux.c
===================================================================
--- gst/mpegstream/gstdvddemux.c	(revision 360)
+++ gst/mpegstream/gstdvddemux.c	(working copy)
@@ -319,6 +319,19 @@
       dvd_demux->segment_filter = TRUE;
       ret = GST_MPEG_PARSE_CLASS (parent_class)->process_event (mpeg_parse,
           event);
+      /* reset last_flow */
+      gint i;
+      GstFlowReturn flow;
+      for (i = 0; i < GST_DVD_DEMUX_NUM_SUBPICTURE_STREAMS; i++) {
+        if (dvd_demux->subpicture_stream[i] != NULL) {
+          flow = dvd_demux->subpicture_stream[i]->last_flow;
+        /* some other return value (must be SUCCESS but we can return
+         * other values as well) */
+          if (flow != GST_FLOW_NOT_LINKED)
+            dvd_demux->subpicture_stream[i]->last_flow = GST_FLOW_OK;
+        }
+      }
+
       break;
     case GST_EVENT_CUSTOM_DOWNSTREAM:
     case GST_EVENT_CUSTOM_DOWNSTREAM_OOB:
Index: gst/mpegstream/gstmpegdemux.c
===================================================================
--- gst/mpegstream/gstmpegdemux.c	(revision 360)
+++ gst/mpegstream/gstmpegdemux.c	(working copy)
@@ -92,6 +92,9 @@
 
 static void gst_mpeg_demux_class_init (GstMPEGDemuxClass * klass);
 
+static gboolean gst_mpeg_demux_process_event (GstMPEGParse * mpeg_parse,
+    GstEvent * event);
+
 static GstPad *gst_mpeg_demux_new_output_pad (GstMPEGDemux * mpeg_demux,
     const gchar * name, GstPadTemplate * temp);
 static void gst_mpeg_demux_init_stream (GstMPEGDemux * mpeg_demux,
@@ -190,6 +193,7 @@
   mpeg_parse_class->parse_packet = gst_mpeg_demux_parse_packet;
   mpeg_parse_class->parse_pes = gst_mpeg_demux_parse_pes;
   mpeg_parse_class->send_buffer = NULL;
+  mpeg_parse_class->process_event = gst_mpeg_demux_process_event;
 
   klass->new_output_pad = gst_mpeg_demux_new_output_pad;
   klass->init_stream = gst_mpeg_demux_init_stream;
@@ -229,6 +233,58 @@
   mpeg_demux->last_pts = -1;
 }
 
+
+static gboolean
+gst_mpeg_demux_process_event (GstMPEGParse * mpeg_parse, GstEvent * event)
+{
+  GstMPEGDemux *demux = GST_MPEG_DEMUX (mpeg_parse);
+  gboolean ret = TRUE;
+
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_FLUSH_STOP:
+      ret = GST_MPEG_PARSE_CLASS (parent_class)->process_event (mpeg_parse,
+          event);
+      /* reset last_flow */
+      gint i;
+      GstFlowReturn flow;
+
+      for (i = 0; i < GST_MPEG_DEMUX_NUM_VIDEO_STREAMS; i++) {
+        if (demux->video_stream[i] != NULL) {
+          flow = demux->video_stream[i]->last_flow;
+        /* some other return value (must be SUCCESS but we can return
+         * other values as well) */
+          if (flow != GST_FLOW_NOT_LINKED)
+            demux->video_stream[i]->last_flow = GST_FLOW_OK;
+        }
+      }
+      for (i = 0; i < GST_MPEG_DEMUX_NUM_AUDIO_STREAMS; i++) {
+        if (demux->audio_stream[i] != NULL) {
+          flow = demux->audio_stream[i]->last_flow;
+        /* some other return value (must be SUCCESS but we can return
+         * other values as well) */
+          if (flow != GST_FLOW_NOT_LINKED)
+            demux->audio_stream[i]->last_flow = GST_FLOW_OK;
+        }
+      }
+      for (i = 0; i < GST_MPEG_DEMUX_NUM_PRIVATE_STREAMS; i++) {
+        if (demux->private_stream[i] != NULL) {
+          flow = demux->private_stream[i]->last_flow;
+        /* some other return value (must be SUCCESS but we can return
+         * other values as well) */
+          if (flow != GST_FLOW_NOT_LINKED)
+            demux->private_stream[i]->last_flow = GST_FLOW_OK;
+        }
+      }
+      break;
+    default:
+      ret = GST_MPEG_PARSE_CLASS (parent_class)->process_event (mpeg_parse,
+          event);
+      break;
+  }
+
+  return ret;
+}
+
 static gint
 _demux_get_writer_id (GstIndex * index, GstPad * pad)
 {
