Include audio mapping in the digest used to distinguish different
[dcpomatic.git] / src / lib / writer.cc
index b175843ed62bb0c975543b980c1bd4dc66f83fc9..2ed55a276595be9bbcd69e348b12b22ad3ac42d8 100644 (file)
@@ -37,6 +37,7 @@
 #include "config.h"
 #include "job.h"
 #include "cross.h"
+#include "md5_digester.h"
 
 #include "i18n.h"
 
@@ -524,9 +525,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;
        }