#include "ab_transcode_job.h"
#include "transcode_job.h"
#include "film.h"
+#include "exceptions.h"
using std::string;
using std::stringstream;
{
_bad = 0;
- int const N = _film->dcp_length ();
+ if (!_film->dcp_length()) {
+ throw EncodeError ("cannot check hashes of a DCP with unknown length");
+ }
+
+ int const N = _film->dcp_length().get();
+ DCPFrameRate const dfr = dcp_frame_rate (_film->frames_per_second ());
- for (int i = 0; i < N; ++i) {
+ for (int i = 0; i < N; i += dfr.skip) {
string const j2k_file = _opt->frame_out_path (i, false);
string const hash_file = j2k_file + ".md5";
}
}
- set_progress (float (i) / _film->length());
+ set_progress (float (i) / N);
}
if (_bad) {