From: Alessandro Decina Date: Thu, 19 Apr 2012 06:31:00 +0000 (+0200) Subject: matroskademux: don't discard the incoming seek segment on push based seeking X-Git-Tag: 1.19.3~509^2~7026 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=66d95d808c51258cbfc1b270a79a9d3742446c56;p=platform%2Fupstream%2Fgstreamer.git 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. --- 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 */