X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdecoder.cc;h=0d4f4babfa9db0831650529ae4ead927260dc7f3;hb=366910025ce80231f1192662efe79f76d78ff572;hp=ee03a1579c59bfe399927fb76a85e316fba21edb;hpb=89aa9d4ba69e471949f791cdafe4ae20cea554d2;p=dcpomatic.git diff --git a/src/lib/decoder.cc b/src/lib/decoder.cc index ee03a1579..0d4f4babf 100644 --- a/src/lib/decoder.cc +++ b/src/lib/decoder.cc @@ -28,20 +28,21 @@ using std::cout; using boost::optional; +/** @return Earliest time of content that the next pass() will emit */ ContentTime Decoder::position () const { optional pos; - if (video && (!pos || video->position() < *pos)) { + if (video && !video->ignore() && (!pos || video->position() < *pos)) { pos = video->position(); } - if (audio && (!pos || audio->position() < *pos)) { + if (audio && !audio->ignore() && (!pos || audio->position() < *pos)) { pos = audio->position(); } - if (subtitle && (!pos || subtitle->position() < *pos)) { + if (subtitle && !subtitle->ignore() && (!pos || subtitle->position() < *pos)) { pos = subtitle->position(); } @@ -49,9 +50,12 @@ Decoder::position () const } void -Decoder::seek (ContentTime time, bool accurate) +Decoder::seek (ContentTime, bool) { if (audio) { audio->seek (); } + if (subtitle) { + subtitle->seek (); + } }