- const double start_time = s->start_time();
- left_time = min(left_time, start_time);
- right_time = max(right_time, start_time +
- d->max_sample_count() / samplerate);
+ const Timestamp start_time = s->start_time();
+ left_time = left_time ?
+ min(*left_time, start_time) :
+ start_time;
+ right_time = right_time ?
+ max(*right_time, start_time + d->max_sample_count() / samplerate) :
+ start_time + d->max_sample_count() / samplerate;