+ if (sp.empty ()) {
+ /* Nothing in this period */
+ return list<T> ();
+ }
+
+ /* Seek if what we want is before what we have, or a more than a little bit after */
+ if (subs.empty() || sp.back().to < subs.front().period().from || sp.front().from > (subs.back().period().to + ContentTime::from_seconds (1))) {
+ seek (sp.front().from, true);
+ }
+
+ /* Now enough pass() calls will either:
+ * (a) give us what we want, or
+ * (b) hit the end of the decoder.
+ */
+ while (!_parent->pass(Decoder::PASS_REASON_SUBTITLE, accurate) && (subs.empty() || (subs.back().period().to < sp.back().to))) {}
+
+ /* Now look for what we wanted in the data we have collected */