X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_examiner.cc;h=3515f34c287e749970809cbd3f750d2f8d8da40c;hb=4d2418d26ea16946931dc2024cc7afd4519fc9b9;hp=72eb828605abe30221077532ab7d7b9dea28aaa5;hpb=6f9adc9f7215a362d23e45b861017638ec67c723;p=dcpomatic.git diff --git a/src/lib/dcp_examiner.cc b/src/lib/dcp_examiner.cc index 72eb82860..3515f34c2 100644 --- a/src/lib/dcp_examiner.cc +++ b/src/lib/dcp_examiner.cc @@ -145,8 +145,6 @@ DCPExaminer::DCPExaminer (shared_ptr content, bool tolerant) if (!reel->main_picture()->asset_ref().resolved()) { LOG_GENERAL("Main picture %1 of reel %2 is missing", reel->main_picture()->id(), reel->id()); _needs_assets = true; - /* Use a dummy value here; it will be replaced when the VF is re-examined. */ - _video_size = dcp::Size(1998, 1080); } else { LOG_GENERAL("Main picture %1 of reel %2 found", reel->main_picture()->id(), reel->id()); @@ -197,17 +195,20 @@ DCPExaminer::DCPExaminer (shared_ptr content, bool tolerant) } } - if (reel->main_subtitle()) { - if (!reel->main_subtitle()->asset_ref().resolved()) { - LOG_GENERAL("Main subtitle %1 of reel %2 is missing", reel->main_subtitle()->id(), reel->id()); + if (auto sub = reel->main_subtitle()) { + if (sub->entry_point().get_value_or(0) != 0) { + _has_non_zero_entry_point[TextType::OPEN_SUBTITLE] = true; + } + if (!sub->asset_ref().resolved()) { + LOG_GENERAL("Main subtitle %1 of reel %2 is missing", sub->id(), reel->id()); _needs_assets = true; } else { - LOG_GENERAL("Main subtitle %1 of reel %2 found", reel->main_subtitle()->id(), reel->id()); + LOG_GENERAL("Main subtitle %1 of reel %2 found", sub->id(), reel->id()); _text_count[TextType::OPEN_SUBTITLE] = 1; - _open_subtitle_language = try_to_parse_language(reel->main_subtitle()->language()); + _open_subtitle_language = try_to_parse_language(sub->language()); - auto asset = reel->main_subtitle()->asset(); + auto asset = sub->asset(); for (auto const& font: asset->font_data()) { _fonts.push_back({reel_index, asset->id(), make_shared(font.first, font.second)}); } @@ -227,6 +228,9 @@ DCPExaminer::DCPExaminer (shared_ptr content, bool tolerant) } for (auto ccap: reel->closed_captions()) { + if (ccap->entry_point().get_value_or(0) != 0) { + _has_non_zero_entry_point[TextType::CLOSED_CAPTION] = true; + } if (!ccap->asset_ref().resolved()) { LOG_GENERAL("Closed caption %1 of reel %2 is missing", ccap->id(), reel->id()); _needs_assets = true;