list<shared_ptr<T> >
SubtitleDecoder::get (list<shared_ptr<T> > const & subs, ContentTimePeriod period)
{
- if (!_subtitle_content->has_subtitle_during (period)) {
+ if (!has_subtitle_during (period)) {
return list<shared_ptr<T> > ();
}
list<shared_ptr<T> > out;
for (typename list<shared_ptr<T> >::const_iterator i = subs.begin(); i != subs.end(); ++i) {
- if ((*i)->period().from <= period.to && (*i)->period().to >= period.from) {
+ if ((*i)->period().overlaps (period)) {
out.push_back (*i);
}
}