From a1a493dae4f7e0cdbbb9a04c40db757898831b57 Mon Sep 17 00:00:00 2001 From: Matej Knopp Date: Sat, 21 Sep 2013 00:55:26 +0200 Subject: [PATCH] matroskademux: update stream->pos when sending buffers so that gap events are not sent unnecessarily https://bugzilla.gnome.org/show_bug.cgi?id=708505 --- gst/matroska/matroska-demux.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index d7b8901..f64b720 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -3753,6 +3753,12 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux, g_assert (stream->alignment <= G_MEM_ALIGN); sub = gst_matroska_demux_align_buffer (demux, sub, stream->alignment); + if (GST_BUFFER_PTS_IS_VALID (sub)) { + stream->pos = GST_BUFFER_PTS (sub); + if (GST_BUFFER_DURATION_IS_VALID (sub)) + stream->pos += GST_BUFFER_DURATION (sub); + } + ret = gst_pad_push (stream->pad, sub); if (demux->common.segment.rate < 0) { -- 2.7.4