Remove redundant DCPDecoder use.
authorCarl Hetherington <cth@carlh.net>
Wed, 6 Mar 2024 00:17:40 +0000 (01:17 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 11 Mar 2024 08:25:25 +0000 (09:25 +0100)
src/lib/dcp_content.cc

index c459a9ece6e099aa82d9a09ac50cfbef72f6d3a8..b1febc5d170be09682efbbf428ff07ab48f050d1 100644 (file)
@@ -709,20 +709,6 @@ DCPContent::can_reference_video (shared_ptr<const Film> film, string& why_not) c
 bool
 DCPContent::can_reference_audio (shared_ptr<const Film> film, string& why_not) const
 {
-       shared_ptr<DCPDecoder> decoder;
-       try {
-               decoder = make_shared<DCPDecoder>(film, shared_from_this(), false, film->tolerant(), shared_ptr<DCPDecoder>());
-       } catch (dcp::ReadError &) {
-               /* We couldn't read the DCP, so it's probably missing */
-               return false;
-       } catch (DCPError &) {
-               /* We couldn't read the DCP, so it's probably missing */
-               return false;
-       } catch (dcp::KDMDecryptionError &) {
-               /* We have an incorrect KDM */
-               return false;
-       }
-
        if (audio && audio->stream()) {
                auto const channels = audio->stream()->channels();
                if (channels != film->audio_channels()) {