Allow no-stretch scaling of video content.
[dcpomatic.git] / src / wx / film_viewer.cc
index ddd6c12c569e8c9ed46706aa81e4108a5a256d32..69cd276e17a9fa6ac64aef63f0bde2b3003ca9d5 100644 (file)
@@ -131,7 +131,7 @@ FilmViewer::set_film (shared_ptr<Film> f)
 
        _player = f->make_player ();
        _player->disable_audio ();
-       _player->Video.connect (boost::bind (&FilmViewer::process_video, this, _1, _2, _4));
+       _player->Video.connect (boost::bind (&FilmViewer::process_video, this, _1, _2, _5));
        _player->Changed.connect (boost::bind (&FilmViewer::player_changed, this, _1));
 
        calculate_sizes ();
@@ -239,7 +239,7 @@ FilmViewer::calculate_sizes ()
 
        Ratio const * container = _film->container ();
        
-       float const panel_ratio = static_cast<float> (_panel_size.width) / _panel_size.height;
+       float const panel_ratio = _panel_size.ratio ();
        float const film_ratio = container ? container->ratio () : 1.78;
                        
        if (panel_ratio < film_ratio) {