Merge master.
[dcpomatic.git] / src / lib / writer.cc
index 9410dd565b4a9ba963cda63af72aea763c489511..580dfe4f21d19e0bfb452a37d32e413ad247d6b5 100644 (file)
@@ -42,6 +42,7 @@
 #include "job.h"
 #include "cross.h"
 #include "audio_buffers.h"
+#include "md5_digester.h"
 
 #include "i18n.h"
 
@@ -493,9 +494,10 @@ Writer::check_existing_picture_mxf_frame (FILE* mxf, int f, Eyes eyes)
                LOG_GENERAL ("Existing frame %1 is incomplete", f);
                return false;
        }
-       
-       string const existing_hash = md5_digest (data.data(), data.size());
-       if (existing_hash != info.hash) {
+
+       MD5Digester digester;
+       digester.add (data.data(), data.size());
+       if (digester.get() != info.hash) {
                LOG_GENERAL ("Existing frame %1 failed hash check", f);
                return false;
        }