Fix erroneous optional dereference.
[dcpomatic.git] / src / lib / image_decoder.cc
index 10eee2f6d40c049dbb7d0bcf2d03470f019e937d..db7c5401fa3591c536fdf6083bf0a159e366e255 100644 (file)
@@ -43,7 +43,7 @@ ImageDecoder::ImageDecoder (shared_ptr<const ImageContent> c)
 }
 
 bool
-ImageDecoder::pass (PassReason)
+ImageDecoder::pass ()
 {
        if (_video_position >= _image_content->video_length()) {
                return true;
@@ -61,7 +61,7 @@ ImageDecoder::pass (PassReason)
                        _image.reset (new MagickImageProxy (path));
                }
        }
-               
+
        video (_image, _video_position);
        ++_video_position;
        return false;
@@ -71,5 +71,5 @@ void
 ImageDecoder::seek (ContentTime time, bool accurate)
 {
        VideoDecoder::seek (time, accurate);
-       _video_position = time.frames (_image_content->video_frame_rate ());
+       _video_position = time.frames_round (_image_content->video_frame_rate ());
 }