Fix up some bugs when using limited DCP range (reported by Wolfgang Woehl).
[dcpomatic.git] / src / lib / check_hashes_job.cc
index 5a927f752bb5815517dfb488787545849884dbe3..f60a2d40d62cff94e24473503dc5a84e733e7357 100644 (file)
@@ -41,17 +41,17 @@ CheckHashesJob::CheckHashesJob (shared_ptr<const FilmState> s, shared_ptr<const
 string
 CheckHashesJob::name () const
 {
-       stringstream s;
-       s << "Check hashes of " << _fs->name;
-       return s.str ();
+       return String::compose ("Check hashes of %1", _fs->name);
 }
 
 void
 CheckHashesJob::run ()
 {
        _bad = 0;
+
+       int const N = _fs->dcp_length ();
        
-       for (int i = 0; i < _fs->length; ++i) {
+       for (int i = 0; i < N; ++i) {
                string const j2k_file = _opt->frame_out_path (i, false);
                string const hash_file = j2k_file + ".md5";