dashdemux mpd seek doesn't allow for manifest-update-with-missing segment (ts less than start-time)
We have a project where we use a dash demux from 1.16.0 reading from Shaka Packager which is producing a continuous output stream with timelines, but the continuous output stream may fail and recover such that the MPD will have say 30 segments at time T and then 1 segment at time T+1 where the segment at T+1 will have a start-time greater than the end-time of the segments at time T.
0:11:00.646132674 ESC[332m20869ESC[00m 0xc16de0 ESC[37mDEBUG ESC[00m ESC[00m dashdemux gstmpdparser.c:4857:gst_mpd_client_stream_seek:ESC[00m ts = 35:31:34.969765555 start=35:31:35.001755555 0:11:00.646150376 ESC[332m20869ESC[00m 0xc16de0 ESC[37mDEBUG ESC[00m ESC[00m dashdemux gstmpdparser.c:4862:gst_mpd_client_stream_seek:ESC[00m delta -31990000 duration 5000000000 produced repeat_index of -605618482
Because ts is less than the end-time of the segment (as well as the start-time), we use the calculation:
repeat_index = (ts - segment->start) / segment->duration;
which results in a large negative repeat_index. I don't know what the correct behaviour should be at a higher level, but there definitely seems to be an edge case in this calculation that should be addressed.
Possibly ts should be set to start-of-segment
if ts < segment->start