diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdclient.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdclient.c index 68ea7593e1..8938ce771e 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdclient.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdclient.c @@ -1705,7 +1705,10 @@ gst_mpd_client_stream_seek (GstMPDClient * client, GstActiveStream * stream, GstClockTime chunk_time; selectedChunk = segment; - repeat_index = (ts - segment->start) / segment->duration; + repeat_index = + ((ts - segment->start) + + ((GstMediaSegment *) stream->segments->pdata[0])->start) / + segment->duration; chunk_time = segment->start + segment->duration * repeat_index; diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/dash/gstmpdclient.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/dash/gstmpdclient.c index 3a7ed981fd..50af5ea15a 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/dash/gstmpdclient.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/dash/gstmpdclient.c @@ -1707,7 +1707,10 @@ gst_mpd_client2_stream_seek (GstMPDClient2 * client, GstActiveStream * stream, GstClockTime chunk_time; selectedChunk = segment; - repeat_index = (ts - segment->start) / segment->duration; + repeat_index = + ((ts - segment->start) + + ((GstMediaSegment *) stream->segments->pdata[0])->start) / + segment->duration; chunk_time = segment->start + segment->duration * repeat_index;