summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2014-07-01 15:14:34 +0100
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2014-07-01 15:14:34 +0100
commit5653b1a25a4aa957b9351bcb14f319bf3a81a5e1 (patch)
tree67bc549b05163c695959c453da91503fe4563897 /gst
parent0e131728377ff9b9cb0e3e22eb6812eac0c339c7 (diff)
matroskademux: send gap events instead of segment tricks
This fixes missing frames from being time skipped. https://bugzilla.gnome.org/show_bug.cgi?id=732372
Diffstat (limited to 'gst')
-rw-r--r--gst/matroska/matroska-demux.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
index 63ecfe1b5..adef916bc 100644
--- a/gst/matroska/matroska-demux.c
+++ b/gst/matroska/matroska-demux.c
@@ -3478,37 +3478,18 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
&& lace_time > demux->common.segment.start
&& (!GST_CLOCK_TIME_IS_VALID (demux->common.segment.stop)
|| lace_time < demux->common.segment.stop)) {
- GstSegment segment;
- GstEvent *event1, *event2;
+ GstEvent *event;
GST_DEBUG_OBJECT (demux,
"Gap of %" G_GINT64_FORMAT " ns detected in"
"stream %d (%" GST_TIME_FORMAT " -> %" GST_TIME_FORMAT "). "
"Sending updated SEGMENT events", diff,
stream->index, GST_TIME_ARGS (stream->pos),
GST_TIME_ARGS (lace_time));
- /* send segment events such that the gap is not accounted in
- * segment base time, hence running_time */
- /* close ahead of gap */
- segment = demux->common.segment;
- segment.start = demux->last_stop_end;
- segment.stop = demux->last_stop_end;
- segment.position = demux->last_stop_end;
- event1 = gst_event_new_segment (&segment);
- /* skip gap */
- segment.start = lace_time;
- segment.stop = demux->common.segment.stop;
- segment.position = lace_time;
- event2 = gst_event_new_segment (&segment);
+
+ event = gst_event_new_gap (demux->last_stop_end, diff);
GST_OBJECT_UNLOCK (demux);
- gst_matroska_demux_send_event (demux, event1);
- gst_matroska_demux_send_event (demux, event2);
+ gst_pad_push_event (stream->pad, event);
GST_OBJECT_LOCK (demux);
- /* align segment view with downstream,
- * prevents double-counting base time when closing segment */
- /* FIXME: in 0.10, the segment base/accum got updated here, but
- * maybe we don't need that because of the double accounting
- * mentioned above? */
- demux->common.segment = segment;
}
}