{
shared_ptr<dcp::CPL> cpl;
- for (int i = 0; i < static_cast<int>(TextType::COUNT); ++i) {
- _text_count[i] = 0;
- }
-
auto cpls = dcp::find_and_resolve_cpls (content->directories(), tolerant);
if (content->cpl ()) {
LOG_GENERAL ("Main subtitle %1 of reel %2 found", i->main_subtitle()->id(), i->id());
- _text_count[static_cast<int>(TextType::OPEN_SUBTITLE)] = 1;
+ _text_count[TextType::OPEN_SUBTITLE] = 1;
_open_subtitle_language = try_to_parse_language (i->main_subtitle()->language());
for (auto const& font: i->main_subtitle()->asset()->font_data()) {
LOG_GENERAL ("Closed caption %1 of reel %2 found", j->id(), i->id());
- _text_count[static_cast<int>(TextType::CLOSED_CAPTION)]++;
+ _text_count[TextType::CLOSED_CAPTION]++;
_dcp_text_tracks.push_back (DCPTextTrack(j->annotation_text().get_value_or(""), try_to_parse_language(j->language())));
}
_reel_lengths.push_back (i->atmos()->actual_duration());
}
+ if (reel_fonts.empty()) {
+ reel_fonts.push_back(make_shared<dcpomatic::Font>(""));
+ }
+
_fonts.push_back(reel_fonts);
}