From 66d95d808c51258cbfc1b270a79a9d3742446c56 Mon Sep 17 00:00:00 2001 From: Alessandro Decina Date: Thu, 19 Apr 2012 08:31:00 +0200 Subject: [PATCH] matroskademux: don't discard the incoming seek segment on push based seeking The incoming seek segment was being discarded leading to push based seeking being potentially inaccurate. --- gst/matroska/matroska-demux.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index 34c3699..9c475ad 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -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 */ -- 2.7.4