projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
It builds.
[dcpomatic.git]
/
src
/
lib
/
subrip_decoder.cc
diff --git
a/src/lib/subrip_decoder.cc
b/src/lib/subrip_decoder.cc
index 6ebb883230849676f07b56527d2b18c26433bf0a..013c6fab7e6d2eab6f93b0ea290ac27fb3dae553 100644
(file)
--- a/
src/lib/subrip_decoder.cc
+++ b/
src/lib/subrip_decoder.cc
@@
-23,15
+23,24
@@
using std::list;
using boost::shared_ptr;
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)
{
}
, _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 ()
{
bool
SubRipDecoder::pass ()
{