From 3a25a3a948b9c2d92c5453a58efeb1806d33497f Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Wed, 14 Jun 2017 21:08:31 +0200 Subject: [PATCH] asfdemux: adjust segment start to a keyframe ts only for a KEYUNIT seek ... which is how it has always been until changed coincidentally in commit 9ee60482b265481d0e3b397044f560eb736e5429 which then prompted commit dba14178ce6115b406ef86e356b1201463af5e2a to consider ACCURATE as well to compensate for that in a lateral way --- gst/asfdemux/gstasfdemux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/asfdemux/gstasfdemux.c b/gst/asfdemux/gstasfdemux.c index 2b0fed1628..c7fa0d42e9 100644 --- a/gst/asfdemux/gstasfdemux.c +++ b/gst/asfdemux/gstasfdemux.c @@ -1648,7 +1648,7 @@ gst_asf_demux_find_stream_with_complete_payload (GstASFDemux * demux) if (G_UNLIKELY (GST_CLOCK_TIME_IS_VALID (payload->ts) && (payload->ts < demux->segment.start))) { - if (G_UNLIKELY ((!demux->keyunit_sync) && (!demux->accurate) + if (G_UNLIKELY ((demux->keyunit_sync) && (!demux->accurate) && payload->keyframe)) { GST_DEBUG_OBJECT (stream->pad, "Found keyframe, updating segment start to %" GST_TIME_FORMAT, @@ -1732,7 +1732,7 @@ gst_asf_demux_push_complete_payloads (GstASFDemux * demux, gboolean force) } /* FIXME : only if ACCURATE ! */ - if (G_LIKELY (!demux->keyunit_sync && !demux->accurate + if (G_LIKELY (demux->keyunit_sync && !demux->accurate && (GST_CLOCK_TIME_IS_VALID (payload->ts))) && !GST_ASF_DEMUX_IS_REVERSE_PLAYBACK (demux->segment)) { GST_DEBUG ("Adjusting newsegment start to %" GST_TIME_FORMAT,