X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fhints.cc;h=0f18835ef47887a8171eba059ae2b5e8032a1877;hb=15a83d720780d58f905d40f8493cdcb86596eaee;hp=6cb037ed0afd2ebd6bb865734de77eebd455f33f;hpb=a1546fb6c4e59621d99271b8ca996e96a574f7b3;p=dcpomatic.git diff --git a/src/lib/hints.cc b/src/lib/hints.cc index 6cb037ed0..0f18835ef 100644 --- a/src/lib/hints.cc +++ b/src/lib/hints.cc @@ -123,7 +123,7 @@ Hints::thread () int scope = 0; BOOST_FOREACH (shared_ptr i, content) { if (i->video) { - Ratio const * r = i->video->scale().ratio (); + Ratio const * r = Ratio::nearest_from_ratio(i->video->scaled_size(film->frame_size()).ratio()); if (r && r->id() == "239") { ++scope; } else if (r && r->id() != "239" && r->id() != "190") { @@ -235,7 +235,7 @@ Hints::thread () for (size_t i = 0; i < sample_peak.size(); ++i) { float const peak = max (sample_peak[i].peak, true_peak.empty() ? 0 : true_peak[i]); - float const peak_dB = 20 * log10 (peak) + an->gain_correction (film->playlist ()); + float const peak_dB = linear_to_db(peak) + an->gain_correction(film->playlist()); if (peak_dB > -3) { ch += dcp::raw_convert (short_audio_channel_name (i)) + ", "; } @@ -259,7 +259,7 @@ Hints::thread () emit (bind(boost::ref(Progress), _("Examining closed captions"))); - shared_ptr player (new Player (film, film->playlist ())); + shared_ptr player (new Player(film)); player->set_ignore_video (); player->set_ignore_audio (); player->Text.connect (bind(&Hints::text, this, _1, _2, _4));