#include <dcp/subtitle_string.h>
#include "subrip_decoder.h"
+#include "subrip_content.h"
using std::list;
using boost::shared_ptr;
SubRipDecoder::SubRipDecoder (shared_ptr<const SubRipContent> content)
- : SubRip (content)
+ : SubtitleDecoder (content)
+ , SubRip (content)
, _next (0)
{
}
+void
+SubRipDecoder::seek (ContentTime time, bool accurate)
+{
+ SubtitleDecoder::seek (time, accurate);
+
+ _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 ()
{