Fix thinko; just because a seek has just happened, it doesn't mean another one isn...
authorCarl Hetherington <cth@carlh.net>
Sun, 20 Nov 2016 19:40:25 +0000 (19:40 +0000)
committerCarl Hetherington <cth@carlh.net>
Sun, 20 Nov 2016 19:40:25 +0000 (19:40 +0000)
src/lib/decoder.cc

index 988b8fe9b2f9fc73a6261064e673396365f71bdf..b7bd78c1404415e6b61c11940d4ccae67502b8d2 100644 (file)
@@ -27,12 +27,7 @@ using boost::optional;
 void
 Decoder::maybe_seek (optional<ContentTime>& position, ContentTime time, bool accurate)
 {
-       if (!position) {
-               /* A seek has just happened */
-               return;
-       }
-
-       if (time >= *position && time < (*position + ContentTime::from_seconds(1))) {
+       if (position && (time >= *position && time < (*position + ContentTime::from_seconds(1)))) {
                /* No need to seek: caller should just pass() */
                return;
        }