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_content.cc | |
| parent | 0beaf6245ef0c1462cbe7eaf6faeabb651b68de3 (diff) | |
Cope with DCPs that have no video and hence no video encoding.
Diffstat (limited to 'src/lib/dcp_content.cc')
| -rw-r--r-- | src/lib/dcp_content.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index c75babfc6..d26b726c2 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -428,7 +428,9 @@ DCPContent::as_xml(xmlpp::Element* element, bool with_paths, PathBehaviour path_ DCPOMATIC_ASSERT(false); } } - cxml::add_text_child(element, "VideoEncoding", video_encoding_to_string(_video_encoding)); + if (_video_encoding) { + cxml::add_text_child(element, "VideoEncoding", video_encoding_to_string(*_video_encoding)); + } cxml::add_text_child(element, "ThreeD", _three_d ? "1" : "0"); if (_content_kind) { cxml::add_text_child(element, "ContentKind", _content_kind->name()); |
