using std::list;
using boost::shared_ptr;
-SubRipDecoder::SubRipDecoder (shared_ptr<const Film> film, shared_ptr<const SubRipContent> content)
- : Decoder (film)
- , SubtitleDecoder (film)
- , SubRip (content)
+SubRipDecoder::SubRipDecoder (shared_ptr<const SubRipContent> content)
+ : SubRip (content)
, _next (0)
{
}
+void
+SubRipDecoder::seek (ContentTime time, bool)
+{
+ _next = 0;
+ list<SubRipSubtitlePiece>::const_iterator i = _subtitles[_next].pieces.begin();
+ while (i != _subtitles[_next].pieces.end() && _subtitles[_next].from < time) {
+ ++i;
+ }
+
+}
+
bool
SubRipDecoder::pass ()
{