When writing an explicit time, reset the cur_time variable to this
value as well. This avoids writing excessive time attributes for each
segment in the timeline, as long as the segments are continuous.
Signed-off-by: Martin Storsjö <martin@martin.st>
Segment *seg = os->segments[i];
int repeat = 0;
avio_printf(out, "\t\t\t\t\t\t<S ");
- if (i == start_index || seg->time != cur_time)
+ if (i == start_index || seg->time != cur_time) {
+ cur_time = seg->time;
avio_printf(out, "t=\"%"PRId64"\" ", seg->time);
+ }
avio_printf(out, "d=\"%d\" ", seg->duration);
while (i + repeat + 1 < os->nb_segments &&
os->segments[i + repeat + 1]->duration == seg->duration &&