From bcbf1f67f098b3e4133d83f6ea28b9d3afba1042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 21 Mar 2017 20:14:53 +0200 Subject: [PATCH] dashdemux: Use gst_mpdparser_get_segment_end_time() directly instead of calculating it again It does the exact same calculations. --- ext/dash/gstmpdparser.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c index 734959dcd5..c479f8dbd3 100644 --- a/ext/dash/gstmpdparser.c +++ b/ext/dash/gstmpdparser.c @@ -4780,13 +4780,9 @@ gst_mpd_client_stream_seek (GstMpdClient * client, GstActiveStream * stream, if (segment->start > ts) break; - if (segment->repeat >= 0) { - end_time = segment->start + (segment->repeat + 1) * segment->duration; - } else { - end_time = - gst_mpdparser_get_segment_end_time (client, stream->segments, - segment, index); - } + end_time = + gst_mpdparser_get_segment_end_time (client, stream->segments, + segment, index); /* avoid downloading another fragment just for 1ns in reverse mode */ if (forward)