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
9ee60482b2 which then prompted commit
dba14178ce to consider ACCURATE as well
to compensate for that in a lateral way
This commit is contained in:
Mark Nauwelaerts 2017-06-14 21:08:31 +02:00
parent 7074d31cb6
commit 3a25a3a948

View file

@ -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,