X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fdcp_examiner.cc;h=8ce4aee001df26f64ca57cb2cb5d2d76c3e17172;hp=c097877a33816f02760491796598a1088793f1e1;hb=cbd4450197a083bf58bda510e626f73ba583cb66;hpb=1013175d5f6adfa0e6a7442e4c9aebb893787748 diff --git a/src/lib/dcp_examiner.cc b/src/lib/dcp_examiner.cc index c097877a3..8ce4aee00 100644 --- a/src/lib/dcp_examiner.cc +++ b/src/lib/dcp_examiner.cc @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -57,7 +58,7 @@ DCPExaminer::DCPExaminer (shared_ptr content) , _audio_length (0) , _has_video (false) , _has_audio (false) - , _has_subtitles (false) + , _captions (0) , _encrypted (false) , _needs_assets (false) , _kdm_valid (false) @@ -165,7 +166,17 @@ DCPExaminer::DCPExaminer (shared_ptr content) return; } - _has_subtitles = true; + ++_captions; + } + + if (i->closed_caption ()) { + if (!i->closed_caption()->asset_ref().resolved()) { + /* We are missing this asset so we can't continue; examination will be repeated later */ + _needs_assets = true; + return; + } + + ++_captions; } if (i->main_picture()) { @@ -174,6 +185,8 @@ DCPExaminer::DCPExaminer (shared_ptr content) _reel_lengths.push_back (i->main_sound()->duration()); } else if (i->main_subtitle()) { _reel_lengths.push_back (i->main_subtitle()->duration()); + } else if (i->closed_caption()) { + _reel_lengths.push_back (i->closed_caption()->duration()); } }