X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fhints_dialog.cc;h=e328661c65f7ac4ecac66e0a47289be1e50e0a64;hb=2d5beb0d6794df13ad1df47e84fd7a57d1d1c64d;hp=75643c312f38deffb104b0766ceaba7d4da01c27;hpb=775ae0e37bbec115d742feade0adc614a9a2301c;p=dcpomatic.git diff --git a/src/wx/hints_dialog.cc b/src/wx/hints_dialog.cc index 75643c312..e328661c6 100644 --- a/src/wx/hints_dialog.cc +++ b/src/wx/hints_dialog.cc @@ -78,11 +78,10 @@ HintsDialog::film_changed () bool big_font_files = false; if (film->interop ()) { BOOST_FOREACH (shared_ptr i, content) { - shared_ptr s = dynamic_pointer_cast (i); - if (s) { - BOOST_FOREACH (shared_ptr j, s->fonts ()) { - for (int i = 0; i < FontFiles::VARIANTS; ++i) { - optional const p = j->file (static_cast (i)); + if (i->subtitle) { + BOOST_FOREACH (shared_ptr j, i->subtitle->fonts ()) { + for (int k = 0; k < FontFiles::VARIANTS; ++k) { + optional const p = j->file (static_cast (k)); if (p && boost::filesystem::file_size (p.get()) >= (640 * 1024)) { big_font_files = true; } @@ -106,9 +105,8 @@ HintsDialog::film_changed () int flat_or_narrower = 0; int scope = 0; BOOST_FOREACH (shared_ptr i, content) { - shared_ptr vc = dynamic_pointer_cast (i); - if (vc) { - Ratio const * r = vc->scale().ratio (); + if (i->video) { + Ratio const * r = i->video->scale().ratio (); if (r && r->id() == "239") { ++scope; } else if (r && r->id() != "239" && r->id() != "full-frame") { @@ -162,8 +160,7 @@ HintsDialog::film_changed () int three_d = 0; BOOST_FOREACH (shared_ptr i, content) { - shared_ptr vc = dynamic_pointer_cast (i); - if (vc && vc->video_frame_type() != VIDEO_FRAME_TYPE_2D) { + if (i->video && i->video->frame_type() != VIDEO_FRAME_TYPE_2D) { ++three_d; } }