Fix check for return value of EssenceType. v1.8.96
authorCarl Hetherington <cth@carlh.net>
Wed, 14 Feb 2024 19:16:58 +0000 (20:16 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 14 Feb 2024 19:16:59 +0000 (20:16 +0100)
A reporter on the forum is making their own DCPs that don't include
an essence type at some point which trips this check as it was before.

src/asset_factory.cc

index d326ba680d30f85d38e491e076742dc652fd7354..be4f6b492088729703dac12eaf96263363e527cf 100644 (file)
@@ -62,7 +62,7 @@ dcp::asset_factory (boost::filesystem::path path, bool ignore_incorrect_picture_
 
        ASDCP::EssenceType_t type;
        auto const result = ASDCP::EssenceType(dcp::filesystem::fix_long_path(path).string().c_str(), type);
-       if (result != ASDCP::RESULT_OK) {
+       if (!ASDCP_SUCCESS(result)) {
                throw ReadError(String::compose("Could not find essence type (%1)", result.Message()), path.string());
        }
        switch (type) {