diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-09-12 23:14:35 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-09-12 23:14:35 +0200 |
| commit | 9c4e649a755918a6f41cf8c16647cc8af58f8376 (patch) | |
| tree | 3d4af30b883becb914d65ef04e96d8376ee2897a /src | |
| parent | 960c69dcaef94e0e4fbbaa9721d5ea6a4a744726 (diff) | |
Somewhat fix inclusion of CCAP language in ISDCF name (#2610).
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/film.cc | 14 | ||||
| -rw-r--r-- | src/lib/film.h | 2 |
2 files changed, 5 insertions, 11 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc index dabef62bb..803dbb732 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -969,23 +969,17 @@ Film::isdcf_name (bool if_created_now) const isdcf_name += "_" + to_upper (audio_language); - /* I'm not clear on the precise details of the convention for CCAP labelling; - for now I'm just appending -CCAP if we have any closed captions. - */ - auto burnt_in = true; - auto ccap = false; for (auto i: content_list) { for (auto text: i->text) { if (text->type() == TextType::OPEN_SUBTITLE && text->use() && !text->burn()) { burnt_in = false; - } else if (text->type() == TextType::CLOSED_CAPTION && text->use()) { - ccap = true; } } } auto sub_langs = subtitle_languages(); + auto ccap_langs = closed_caption_languages(); if (sub_langs.first && sub_langs.first->language()) { auto lang = entry_for_language(*sub_langs.first); if (burnt_in) { @@ -995,15 +989,13 @@ Film::isdcf_name (bool if_created_now) const } isdcf_name += "-" + lang; + } else if (!ccap_langs.empty()) { + isdcf_name += "-" + to_upper(entry_for_language(ccap_langs[0])) + "-CCAP"; } else { /* No subtitles */ isdcf_name += "-XX"; } - if (ccap) { - isdcf_name += "-CCAP"; - } - if (_release_territory) { auto territory = _release_territory->subtag(); isdcf_name += "_" + to_upper (territory); diff --git a/src/lib/film.h b/src/lib/film.h index 5c230614d..8aeae8e4e 100644 --- a/src/lib/film.h +++ b/src/lib/film.h @@ -74,6 +74,7 @@ class Job; class Film; struct isdcf_name_test; struct isdcf_name_with_atmos; +struct isdcf_name_with_ccap; struct recover_test_2d_encrypted; struct atmos_encrypted_passthrough_test; @@ -447,6 +448,7 @@ private: friend struct ::isdcf_name_test; friend struct ::isdcf_name_with_atmos; + friend struct ::isdcf_name_with_ccap; friend struct ::recover_test_2d_encrypted; friend struct ::atmos_encrypted_passthrough_test; template <class, class> friend class ChangeSignalDespatcher; |
