Ignore HMAC discrepencies when reading DCPs.
authorCarl Hetherington <cth@carlh.net>
Fri, 4 Jun 2021 20:30:25 +0000 (22:30 +0200)
committerCarl Hetherington <cth@carlh.net>
Fri, 4 Jun 2021 20:30:25 +0000 (22:30 +0200)
cscript
src/lib/atmos_mxf_decoder.cc
src/lib/dcp_decoder.cc
src/lib/dcp_examiner.cc
src/lib/video_mxf_decoder.cc

diff --git a/cscript b/cscript
index 0045d80..0f38bb8 100644 (file)
--- a/cscript
+++ b/cscript
@@ -388,8 +388,8 @@ def dependencies(target, options):
         # Use distro-provided FFmpeg on Arch
         deps = []
 
-    deps.append(('libdcp', '42feb7f'))
-    deps.append(('libsub', 'f3d7335'))
+    deps.append(('libdcp', 'a5bd2e9'))
+    deps.append(('libsub', '44cf236'))
     deps.append(('leqm-nrt', '93ae9e6'))
     deps.append(('rtaudio', 'f619b76'))
     # We get our OpenSSL libraries from the environment, but we
index 9fcd9d2..19a19a8 100644 (file)
@@ -40,6 +40,7 @@ AtmosMXFDecoder::AtmosMXFDecoder (std::shared_ptr<const Film> film, std::shared_
 
        auto asset = make_shared<dcp::AtmosAsset>(_content->path(0));
        _reader = asset->start_read ();
+       _reader->set_check_hmac (false);
        _metadata = AtmosMetadata (asset);
 }
 
index f9b0d9a..9de63dc 100644 (file)
@@ -363,9 +363,11 @@ DCPDecoder::get_readers ()
                DCPOMATIC_ASSERT (mono || stereo);
                if (mono) {
                        _mono_reader = mono->start_read ();
+                       _mono_reader->set_check_hmac (false);
                        _stereo_reader.reset ();
                } else {
                        _stereo_reader = stereo->start_read ();
+                       _stereo_reader->set_check_hmac (false);
                        _mono_reader.reset ();
                }
        } else {
@@ -375,6 +377,7 @@ DCPDecoder::get_readers ()
 
        if ((*_reel)->main_sound()) {
                _sound_reader = (*_reel)->main_sound()->asset()->start_read ();
+               _sound_reader->set_check_hmac (false);
        } else {
                _sound_reader.reset ();
        }
@@ -382,6 +385,7 @@ DCPDecoder::get_readers ()
        if ((*_reel)->atmos()) {
                shared_ptr<dcp::AtmosAsset> asset = (*_reel)->atmos()->asset();
                _atmos_reader = asset->start_read();
+               _atmos_reader->set_check_hmac (false);
                _atmos_metadata = AtmosMetadata (asset);
        } else {
                _atmos_reader.reset ();
index b431cec..ffdcad1 100644 (file)
@@ -241,9 +241,13 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant)
                        auto stereo = dynamic_pointer_cast<dcp::StereoPictureAsset>(pic);
 
                        if (mono) {
-                               mono->start_read()->get_frame(0)->xyz_image ();
+                               auto reader = mono->start_read();
+                               reader->set_check_hmac (false);
+                               reader->get_frame(0)->xyz_image();
                        } else {
-                               stereo->start_read()->get_frame(0)->xyz_image(dcp::Eye::LEFT);
+                               auto reader = stereo->start_read();
+                               reader->set_check_hmac (false);
+                               reader->get_frame(0)->xyz_image(dcp::Eye::LEFT);
                        }
 
                        if (i->main_sound()) {
@@ -251,7 +255,9 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant)
                                if (sound->encrypted() && !sound->key()) {
                                        _kdm_valid = false;
                                }
-                               i->main_sound()->asset()->start_read()->get_frame(0);
+                               auto reader = i->main_sound()->asset()->start_read();
+                               reader->set_check_hmac (false);
+                               reader->get_frame(0);
                        }
 
                        if (i->main_subtitle()) {
@@ -268,7 +274,9 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant)
                                if (atmos->encrypted() && !atmos->key()) {
                                        _kdm_valid = false;
                                }
-                               atmos->start_read()->get_frame(0);
+                               auto reader = atmos->start_read();
+                               reader->set_check_hmac (false);
+                               reader->get_frame(0);
                        }
                }
        } catch (dcp::ReadError& e) {
index 39c4a37..92cab02 100644 (file)
@@ -67,9 +67,11 @@ VideoMXFDecoder::VideoMXFDecoder (shared_ptr<const Film> film, shared_ptr<const
 
        if (mono) {
                _mono_reader = mono->start_read ();
+               _mono_reader->set_check_hmac (false);
                _size = mono->size ();
        } else {
                _stereo_reader = stereo->start_read ();
+               _stereo_reader->set_check_hmac (false);
                _size = stereo->size ();
        }
 }