diff --git a/gst/mpegstream/gstmpegdemux.c b/gst/mpegstream/gstmpegdemux.c
index 243a36d..76ca5f6 100644
--- a/gst/mpegstream/gstmpegdemux.c
+++ b/gst/mpegstream/gstmpegdemux.c
@@ -1039,6 +1039,35 @@ gst_mpeg_demux_send_subbuffer (GstMPEGDemux * mpeg_demux,
   if (G_UNLIKELY (offset + size > GST_BUFFER_SIZE (buffer)))
     goto broken_file;
 
+  if (GST_CLOCK_TIME_IS_VALID (timestamp) &&
+      GST_CLOCK_TIME_IS_VALID (mpeg_parse->current_segment.last_stop)) {
+    GstClockTimeDiff diff;
+    guint64 update_time;
+
+    update_time = MIN (timestamp, mpeg_parse->current_segment.stop);
+    update_time = MAX (timestamp, mpeg_parse->current_segment.start);
+    diff = GST_CLOCK_DIFF (mpeg_parse->current_segment.last_stop, update_time);
+    if (diff > GST_SECOND * 2) {
+      GST_DEBUG_OBJECT (mpeg_demux, "Gap of %" GST_TIME_FORMAT " detected in "
+          "stream %d. Sending updated NEWSEGMENT events", GST_TIME_ARGS (diff),
+          outstream->number);
+      PARSE_CLASS (mpeg_parse)->send_event (mpeg_parse,
+          gst_event_new_new_segment (TRUE, mpeg_parse->current_segment.rate,
+              GST_FORMAT_TIME, mpeg_parse->current_segment.last_stop,
+              mpeg_parse->current_segment.last_stop,
+              mpeg_parse->current_segment.last_stop));
+      gst_segment_set_newsegment (&mpeg_parse->current_segment,
+          FALSE, mpeg_parse->current_segment.rate, GST_FORMAT_TIME,
+          update_time, mpeg_parse->current_segment.stop, update_time);
+      PARSE_CLASS (mpeg_parse)->send_event (mpeg_parse,
+          gst_event_new_new_segment (FALSE, mpeg_parse->current_segment.rate,
+              GST_FORMAT_TIME, update_time,
+              mpeg_parse->current_segment.stop, update_time));
+    }
+    gst_segment_set_last_stop (&mpeg_parse->current_segment,
+        GST_FORMAT_TIME, update_time);
+  }
+
   outbuf = gst_buffer_create_sub (buffer, offset, size);
   gst_buffer_set_caps (outbuf, GST_PAD_CAPS (outstream->pad));
 
