matroskademux: update stream->pos when sending buffers so that gap events are not...
authorMatej Knopp <matej.knopp@gmail.com>
Fri, 20 Sep 2013 22:55:26 +0000 (00:55 +0200)
committerThiago Santos <ts.santos@partner.samsung.com>
Tue, 24 Sep 2013 22:12:44 +0000 (15:12 -0700)
https://bugzilla.gnome.org/show_bug.cgi?id=708505

gst/matroska/matroska-demux.c

index d7b8901..f64b720 100644 (file)
@@ -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) {