Remove in-place translations support.
[dcpomatic.git] / src / lib / video_mxf_decoder.cc
index d3fe2b897355ce8e71af8d680848024ed6e1854b..40d3a461afbd4ebb4fd57765d5bc80a5f42d8c39 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2016-2017 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2016-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -43,35 +43,22 @@ VideoMXFDecoder::VideoMXFDecoder (shared_ptr<const Film> film, shared_ptr<const
 {
        video = make_shared<VideoDecoder>(this, content);
 
-       shared_ptr<dcp::MonoPictureAsset> mono;
        try {
-               mono = make_shared<dcp::MonoPictureAsset>(_content->path(0));
+               auto mono = make_shared<dcp::MonoPictureAsset>(_content->path(0));
+               _mono_reader = mono->start_read ();
+               _mono_reader->set_check_hmac (false);
+               _size = mono->size ();
+               return;
        } catch (dcp::MXFFileError& e) {
                /* maybe it's stereo */
        } catch (dcp::ReadError& e) {
                /* maybe it's stereo */
        }
 
-       shared_ptr<dcp::StereoPictureAsset> stereo;
-       try {
-               stereo = make_shared<dcp::StereoPictureAsset>(_content->path(0));
-       } catch (dcp::MXFFileError& e) {
-               if (!mono) {
-                       throw;
-               }
-       } catch (dcp::ReadError& e) {
-               if (!mono) {
-                       throw;
-               }
-       }
-
-       if (mono) {
-               _mono_reader = mono->start_read ();
-               _size = mono->size ();
-       } else {
-               _stereo_reader = stereo->start_read ();
-               _size = stereo->size ();
-       }
+       auto stereo = make_shared<dcp::StereoPictureAsset>(_content->path(0));
+       _stereo_reader = stereo->start_read ();
+       _stereo_reader->set_check_hmac (false);
+       _size = stereo->size ();
 }