From 7d66bda50ade8ea618f331b885f1bfa4fa0a2af9 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 11 Apr 2021 20:49:44 +0200 Subject: Split ReelSubtitleAsset into Interop and SMPTE classes. --- src/verify.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/verify.cc') diff --git a/src/verify.cc b/src/verify.cc index 6adab99d..e176362a 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -47,9 +47,11 @@ #include "raw_convert.h" #include "reel.h" #include "reel_closed_caption_asset.h" +#include "reel_interop_subtitle_asset.h" #include "reel_markers_asset.h" #include "reel_picture_asset.h" #include "reel_sound_asset.h" +#include "reel_smpte_subtitle_asset.h" #include "reel_subtitle_asset.h" #include "smpte_subtitle_asset.h" #include "stereo_picture_asset.h" @@ -991,7 +993,13 @@ verify_text_timing (vector> reels, vector& no return static_cast(reel->main_subtitle()); }, [](shared_ptr reel) { - return reel->main_subtitle()->asset()->raw_xml(); + auto interop = dynamic_pointer_cast(reel->main_subtitle()); + if (interop) { + return interop->asset()->raw_xml(); + } + auto smpte = dynamic_pointer_cast(reel->main_subtitle()); + DCP_ASSERT (smpte); + return smpte->asset()->raw_xml(); }, [](shared_ptr reel) { return reel->main_subtitle()->actual_duration(); @@ -1234,7 +1242,7 @@ dcp::verify ( notes.push_back ({VerificationNote::Type::ERROR, VerificationNote::Code::INVALID_INTRINSIC_DURATION, i->id()}); } auto file_asset = dynamic_pointer_cast(i); - if (file_asset && !file_asset->hash()) { + if (dynamic_pointer_cast(i) && !file_asset->hash()) { notes.push_back ({VerificationNote::Type::BV21_ERROR, VerificationNote::Code::MISSING_HASH, i->id()}); } } -- cgit v1.2.3