diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-12-28 20:20:13 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-12-30 12:22:30 +0100 |
| commit | 973f21989ce80584840c390bdf5f9e0c67301e98 (patch) | |
| tree | 68d0c08ccaab58c68563712ad9b3908b2d302c75 /src/lib/dcp_examiner.cc | |
| parent | 0beaf6245ef0c1462cbe7eaf6faeabb651b68de3 (diff) | |
Cope with DCPs that have no video and hence no video encoding.
Diffstat (limited to 'src/lib/dcp_examiner.cc')
| -rw-r--r-- | src/lib/dcp_examiner.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/lib/dcp_examiner.cc b/src/lib/dcp_examiner.cc index 6a1321878..4e8f611de 100644 --- a/src/lib/dcp_examiner.cc +++ b/src/lib/dcp_examiner.cc @@ -341,9 +341,16 @@ DCPExaminer::DCPExaminer(shared_ptr<const DCPContent> content, bool tolerant) * asset in each reel. This checks that when we do have a key it's the right one. */ _kdm_valid = selected_cpl->can_be_read(); - auto encoding = selected_cpl->picture_encoding(); - DCPOMATIC_ASSERT(encoding == dcp::PictureEncoding::JPEG2000 || encoding == dcp::PictureEncoding::MPEG2); - _video_encoding = encoding == dcp::PictureEncoding::MPEG2 ? VideoEncoding::MPEG2 : VideoEncoding::JPEG2000; + switch (selected_cpl->picture_encoding()) { + case dcp::PictureEncoding::JPEG2000: + _video_encoding = VideoEncoding::JPEG2000; + break; + case dcp::PictureEncoding::MPEG2: + _video_encoding = VideoEncoding::MPEG2; + break; + default: + break; + } _standard = selected_cpl->standard(); if (!selected_cpl->reels().empty()) { auto first_reel = selected_cpl->reels()[0]; |
