matroskademux: don't discard the incoming seek segment on push based seeking
authorAlessandro Decina <alessandro.d@gmail.com>
Thu, 19 Apr 2012 06:31:00 +0000 (08:31 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 24 May 2012 12:26:23 +0000 (14:26 +0200)
The incoming seek segment was being discarded leading to push based seeking
being potentially inaccurate.

gst/matroska/matroska-demux.c

index 34c3699..9c475ad 100644 (file)
@@ -2010,6 +2010,11 @@ gst_matroska_demux_handle_seek_event (GstMatroskaDemux * demux,
   GST_OBJECT_UNLOCK (demux);
 
   if (demux->streaming) {
+    GST_OBJECT_LOCK (demux);
+    /* now update the real segment info */
+    GST_DEBUG_OBJECT (demux, "Committing new seek segment");
+    memcpy (&demux->common.segment, &seeksegment, sizeof (GstSegment));
+    GST_OBJECT_UNLOCK (demux);
     /* need to seek to cluster start to pick up cluster time */
     /* upstream takes care of flushing and all that
      * ... and segment event handling takes care of the rest */