diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-12-08 11:23:58 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-12-08 11:23:58 +0000 |
| commit | a28ef704adf8c5bfa45b3d6285f741af64758ceb (patch) | |
| tree | 04c1afa7b6a72f7faabe290d14713d242b867ab1 /src/lib/decoder.cc | |
| parent | 804f43474bba7008bf68fc9189793c89c512a944 (diff) | |
Further fixes and tidying to 'better-seek'.
This fixes the failure to keep track of the `position' of
each stream of a multi-stream file. It also tidies things
up a bit.
Diffstat (limited to 'src/lib/decoder.cc')
| -rw-r--r-- | src/lib/decoder.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/decoder.cc b/src/lib/decoder.cc index b7bd78c14..e538a51d4 100644 --- a/src/lib/decoder.cc +++ b/src/lib/decoder.cc @@ -19,19 +19,19 @@ */ #include "decoder.h" +#include "decoder_part.h" #include <iostream> using std::cout; using boost::optional; void -Decoder::maybe_seek (optional<ContentTime>& position, ContentTime time, bool accurate) +Decoder::maybe_seek (opional<ContentTime> position, ContentTime time, bool accurate) { - if (position && (time >= *position && time < (*position + ContentTime::from_seconds(1)))) { + if (position && (time >= position.get() && time < (position.get() + ContentTime::from_seconds(1)))) { /* No need to seek: caller should just pass() */ return; } - position.reset (); seek (time, accurate); } |
